Genesis 1:24-27 states that humans were created after the other animals, and the first man and woman were created simultaneously.
1:24 And God said, Let the earth bring forth the living creature after his kind, cattle, and creeping thing, and beast of the earth after his kind: and it was so.
1:25 And God made the beast of the earth after his kind, and cattle after their kind, and every thing that creepeth upon the earth after his kind: and God saw that it was good.
1:26 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.
1:27 So God created man in his own image, in the image of God created he him; male and female created he them.
While Genesis 2:18-22 states that man was created first, then the animals and only then the woman from the man's rib.
2:18 And the LORD God said, It is not good that the man should be alone; I will make him an help meet for him.
2:19 And out of the ground the LORD God formed every beast of the field, and every fowl of the air; and brought them unto Adam to see what he would call them: and whatsoever Adam called every living creature, that was the name thereof.
2:20 And Adam gave names to all cattle, and to the fowl of the air, and to every beast of the field; but for Adam there was not found an help meet for him.
2:21 And the LORD God caused a deep sleep to fall upon Adam, and he slept: and he took one of his ribs, and closed up the flesh instead thereof;
2:22 And the rib, which the LORD God had taken from man, made he a woman, and brought her unto the man.
Which one is the correct order of events?