This Bible contradiction is from the Skeptic's Annotated Bible.
They went to Egypt after Jesus' birth.
Matthew 2:14 View context
When he arose, he took the young child and his mother by night, and departed into Egypt:
They went to Nazareth after Jesus' birth.
Luke 2:39 View context
And when they had performed all things according to the law of the Lord, they returned into Galilee, to their own city Nazareth.