This is how it works.
There are multiple authors of the first 5 books of the Bible. Genesis especially has several different sources that were blended into a single book and labeled as "Genesis". It was not written by a single author in one sitting or even over a few years.
The first chapter of Genesis is the classic 6-day creation story. Light is created, the sun and moon after the light (?!), day and night are created (but before the sun and moon!), the ocean is separated into the waters of the earth and the waters of heaven (ie why is the sky blue?), plant life is created, then the animals, and finally "man" and in this chapter man refers to "all humans", both male and female. This first account of creation specifically implies that men and women are created at the same time, not separately and not man first, woman after out of man. In this account, it is stated that God created "man" (male AND female) in the likeness or image of God. God commands the humans to "be fruitful and multiply" and then comes day 7.
Now, comes chapter 2. Chapter 2 is a different creation story altogether. Compare it carefully to chapter 1 and you will see the incongruencies.
First of all, the chapter shifts linguistic style. You may not see that in an English translation, but scholars of Biblical Hebrew (and my mother was one) have noted and studied this stylistic difference.
Second, it starts by saying that this chapter takes place in the day before any green thing grew on the face of the earth. On that day, God took dust from the ground, molded it as clay, breathed into it (ie gave it the breath of God, or Spirit), and that was Adam. God then places Adam in the Garden, and brings out all the animals and lets Adam name them. Once it is clear that none is a suitable companion for Adam, God makes Adam sleep, takes out a rib, and fashions Woman.
Notice the problem? Chapter 2 states that Adam was created before plant life came forth - that is, well before day 6 in the Chapter 1 story, which is the day humans are created (plant life comes on day 5).
The story in chapter 2 (and in fact the story of generations from Adam to Noah, and the story of the great flood) is rooted in the mythology of ancient Babylon, which in turn is rooted in myths from the Sumerians and Chaldeans (note that Abraham himself is a Chaldean). Chapter 1, however, is a completely different story that is not rooted in any one specific locale or people. It is probably the later of the two accounts, in terms of when it was written. It was arranged prior to chapter 2, obviously, because it is poetic and provides a grand beginning to the book of Genesis (in the eyes of whatever men were responsible for compiling all these stories into one book).