It seems confusing only because we think with carnal minds. Here it is plainly.
Romans 5:13-14
(For until the law sin was in the world: but sin is not imputed when there is no law.
14Nevertheless death reigned from Adam to Moses, even over them that had not sinned after the similitude of Adam's transgression, who is the figure of him that was to come.
Before the law, sin was already here, but because there was no law, spoken or otherwise at this time, sin was not imputed on anyone. When Adam was formed, he was given a commandment not to eat of the tree of the knowledge of good and evil. He transgressed the law and thus death reigned from Adam to Moses. We were taught to believe that Adam was the first man. We know the story as sin was imputed upon Adam and everone else since the fall. But if this is the case, then who were those who sinned and had it not imputed upon them?
Genesis 1:26-31
And God said, Let us make man in our image, after our likeness: and let them have dominion over the fish of the sea, and over the fowl of the air, and over the cattle, and over all the earth, and over every creeping thing that creepeth upon the earth.
27So God created man in his own image, in the image of God created he him; male and female created he them.
28And God blessed them, and God said unto them, Be fruitful, and multiply, and replenish the earth, and subdue it: and have dominion over the fish of the sea, and over the fowl of the air, and over every living thing that moveth upon the earth.
29And God said, Behold, I have given you every herb bearing seed, which is upon the face of all the earth, and every tree, in the which is the fruit of a tree yielding seed; to you it shall be for meat.
30And to every beast of the earth, and to every fowl of the air, and to every thing that creepeth upon the earth, wherein there is life, I have given every green herb for meat: and it was so. 31And God saw every thing that he had made, and, behold, it was very good. And the evening and the morning were the sixth day.
We see that God created man, male and female on the sixth day. He gave them dominion over every living thing that moves upon the earth and blessed them. Now we come to some of the keys of the whole story. God gave of them EVERY TREE for meat! You see? There was no commandment on the sixth day and although sin was already in the world, it was not imputed upon anyone because there was no commandment. Mankind was made on the sixth day. All races were created at that time! We also come across another important statement. "And the evening and the morning were the sixth day". This statement, as in the previous days before it all ended with this.
Genesis 2:1-5
Thus the heavens and the earth were finished, and all the host of them.
2And on the seventh day God ended his work which he had made; and he rested on the seventh day from all his work which he had made.
3And God blessed the seventh day, and sanctified it: because that in it he had rested from all his work which God created and made.
4These are the generations of the heavens and of the earth when they were created, in the day that the LORD God made the earth and the heavens, 5And every plant of the field before it was in the earth, and every herb of the field before it grew: for the LORD God had not caused it to rain upon the earth, and there was not a man to till the ground.
On the seventh day, God ended His work. Does this mean that every Saturday God rests from work? No! Jesus said that His Father works as does He. What type of work did He rest from? The work of the physical image of creation. Now we get to two more key points. God blessed the seventh day and sanctified it. He set that day apart from the other six days. It also said that He had rested in it. But does it say that it ended? We can assume it did but nowhere does it state 'and thus the evening and the morning were the seventh day'! It is from here, we start to shape God in our image. These are not literal days that God created in. Another important key is that the Bible said that there was no man to till the ground. If indeed Adam was the first man created, then there wouldn't be a man to do anything!
Genesis 2:7-9
And the LORD God formed man of the dust of the ground, and breathed into his nostrils the breath of life; and man became a living soul.
8And the LORD God planted a garden eastward in Eden; and there he put the man whom he had formed. 9And out of the ground made the LORD God to grow every tree that is pleasant to the sight, and good for food; the tree of life also in the midst of the garden, and the tree of knowledge of good and evil.
Now we see the man FORMED by the LORD and breathed into his nostrils the breath of life. This man was a living soul. This wasn't just physical breathing as animals breath as well. God had given adam His spirit of truth. He then took the man He had formed and placed him in the garden.
Genesis 2:15-17
And the LORD God took the man, and put him into the garden of Eden to dress it and to keep it.
16And the LORD God commanded the man, saying, Of every tree of the garden thou mayest freely eat: 17But of the tree of the knowledge of good and evil, thou shalt not eat of it: for in the day that thou eatest thereof thou shalt surely die.
Here we learn a few other key points. The reason this man was put in the garden was to dress it and keep it. What does that mean?
Job 29:14
I put on righteousness, and it clothed me: my judgment was as a robe and a diadem.
Psalms 132:9
Let thy priests be clothed with righteousness; and let thy saints shout for joy.
2 Corinthians 5:1-6
For we know that if our earthly house of this tabernacle were dissolved, we have a building of God, an house not made with hands, eternal in the heavens.
2For in this we groan, earnestly desiring to be clothed upon with our house which is from heaven:
3If so be that being clothed we shall not be found naked.
4For we that are in this tabernacle do groan, being burdened: not for that we would be unclothed, but clothed upon, that mortality might be swallowed up of life.
5Now he that hath wrought us for the selfsame thing is God, who also hath given unto us the earnest of the Spirit. 6Therefore we are always confident, knowing that, whilst we are at home in the body, we are absent from the Lord:
Physically, Adam and Eve were naked, but they were not ashamed. They were clothed with righteousness and who's work it was to dress the rest of mankind with righteousness as well.
We also see that on day six mankind was given to freely eat of every tree that grew out of the earth. But in the garden, the man who was formed by the LORD was given first a commandment. This man was set apart, being formed on the seventh day to do the work of tilling the ground, or to clothe mankind with the righteousness of God. Adam was told that in the day that he eats of this tree, he shall surely die. Did this death happen literaly? no. Adam lived to be over 900 years old! He died spiritually. On the sixth day, mankind ate of that tree without sin imputed upon them. But the seventh day was sanctified, or set apart. And Adam, being formed on this day and the first man who was sanctified, was not allowed to partake of that tree. He did and thus defiled the Sabbath and through that act, death reigned.