Genesis 7:24, 8:3 stated that the flood lasted for 150 days. However, Genesis 7:4, 7:12, 7:17 stated that the flood lasted for 40 days.
This confusion can be easily cleared up as the two numbers refer to two different things. The verses referencing the 40 days clearly refer to how long the rain would last while the verses referencing the 150 days refer to how long the water would remain. In other words, it rained for 40 days and it took an additional 110 days for the water to dry up.