The original question regarding the differing lineages of Jesus does not seem to have been answered. . . .
The four Gospels each have a theme to them. Matthew presents Jesus as King. Mark presents Jesus as a servant. Luke presents Jesus as the Son of Man. And finally, John presents Jesus as God.
Matthew includes the lineage of Jesus to show the significant figures in the genealogy of Christ. The genealogy starts with Abraham, "the first Jew", to show that Christ is, indeed, the "King of the Jews." There are many other notable figures in this genealogy, including King David and his son Solomon (take note: the genealogy presenting Christ as King traces the lineage through Solomon and not Nathan).
Mark does not include a lineage of Jesus at all. Why? In the time of Christ the genealogy of a servant was not significant. In the same way, John does not include a lineage because it is a portrayal of Christ as the Everlasting God, who is and always has been, and has no genealogy.
Luke does include a genealogy of Christ, but it differs greatly from the one in Matthew. First off, Luke traces Christ's lineage all the way back to Adam, the first man, to show that Christ is, indeed, the "Son of Man." Luke therefore focuses on the fact the Jesus was born to a woman (Mary) and even focuses on Mary herself in the early chapters.
Matthew and Luke's lineages are identical from Abraham to King David, but after this they do not agree at all until Joseph, Jesus' "father." Why such a seemingly blatant contradiction in the Word of God? Simple. Matthew traces Jesus' lineage through Joseph, the man--the "head of the household", because he was portraying Jesus as a king and the father's genealogy was what mattered. Luke, on the other hand, traces Christ's lineage through Mary. Although it lists Joseph as Jesus' father, it is meant as the household of Joseph, in which Mary is included. Luke even alludes to this in verse 23 of the same chapter: "Now Jesus himself was about thirty years old. . .He was the son, SO IT WAS THOUGHT, of Joseph. . ." Luke is not only pointing out that Joseph is not Christ's real father (God is), but also that this particular lineage is traced through Mary. This accounts for the differences in the genealogies.
The fact that each gospel is written in such a manner where each portrays Christ in a different way is proof to me that "all Scripture is God-breathed."
Finally, there is a mysterious "Cainan" between Arphaxad and Shelah in the Luke genealogy that does not appear in Genesis. I have heard this is because Cainan is Shelah's father, and Arphaxad was Shelah's stepfather, and Luke included both whereas Moses omitted Cainan (because he was cursed and cast-off, or something like that). I know that last part was a bit unclear, but hopefully you understand what I am saying.