"What can I say to this atheist guy I'm conversing with about how the genealogies given by Matthew and Luke don't agree and trace Jesus's line to David differently, starting with different fathers for Joseph? He also wants to know why they trace it through Joseph if he is not the biological father."
First of all, let me say, that people that argue these 2 geneologies, don't usually get the "sign"ificance of it, let alone understand why its done this way. This is a messy argument, and I could spend 3 pages, alone, just spelling out the the 'so-called' discrepancies. Most atheists that argue this, don't have a clue to what the controversies are, let alone have any knowledge to debate you with it. It's just another excuse to discredit the whole Bible, based on few misinterpreted verses. If this is a personal debate, you have the advantage to research it and provide the answers. If it's an online debate, you have just as much info online to make your point, as they do to discredit it.
* [ My Notes] - Concerning Legal & Paternal Relationships
EW Bullinger's Companion Bible [& Commentary] pretty much spells out why, Joseph had two fathers.
Luke 3:23 And Jesus Himself when He began His ministry He was about thirty years old, being (as reckoned by law) [Legal Father] the Son of Joseph, Who was the son of Heli [Eli],
23 as reckoned by law. Gr. nomizo =to lay down a thing as law; to hold by custom, or usage; ... Joseph was begotten by Jacob, and was his natural son (Matt. 1:16). He could be the legal son of Heli, therefore, only by marriage with Heli’s daughter (Mary), and be reckoned so according to law. It does not say “begat” in the case of Heli ... see Ap.99.
Appendix 99
Luke 3:31 Who was the son of Melea, who was the son of Menan, who was the son of Mattatha, who was the son of Nathan [the natural line], who was the son of David,
31 Nathan. This is the natural line through Nathan. In Matthew 1:6, the regal line is shown through Solomon. Thus both lines became united in Joseph; and thus the Lord being raised from the dead is the one and only heir to the throne of David.
EW Bullinger's Preface on Luke's Gospel
The Divine purpose in the Gospel by Luke is to set forth the Lord not so much as the Messiah, “the King of Israel”, as in Matthew’s Gospel ... but as what He was in Jehovah’s sight, as the ideal MAN—“
Matthew 1:18-25
But the begetting of Jesus Christ was on this wise [account]: When as His mother Mary had been betrothed [pledged] to Joseph, before they came together, she was found with Child of the Holy Spirit. Then Joseph her husband, though he was a just man, yet not wishing to expose her to shame, made up his mind to divorce her [according to the law] secretly. But while he thought on these things, *behold, the [messenger of the Lord] appeared unto him in a dream, saying, Joseph, thou [son of David], be not afraid to take unto thee Mary thy [wife]: for That Which is [begotten] in her is of the Holy Spirit. And she shall bring forth a Son, and thou shalt call Him JESUS: for He shall save His people from their sins. Now the whole of this was done, that it might be fulfilled whichwas spoken by the Lord through the prophet, saying, *Behold, a virgin shall be with child, and shall bring forth a Son, and they shall call Him Emmanuel, which being interpreted is, God with us. [Quoting Isaiah 7:14] Then Joseph being raised from sleep did as the [messenger of the Lord] had bidden him, and took unto him his [wife]: And [knew her not] till she had brought forth her firstborn Son: and Joseph called Him JESUS.
Here's some interesting sources dealing with the issue, both good & bad.
http://www.infidels.org/library/modern/paul_carlson/nt_contradictions.html
New Testament Contradictions (1995) Paul Carlson
http://www.mountainretreatorg.net/faq/birth2.html
Is there a Contradiction in the Genealogies of Luke and Matthew? Tony Warren
http://www.theology.edu/ap10.htm
The Genealogy of Jesus
http://www.rejectionofpascalswager.net/genealogy.html
The Genealogies in Matthew and Luke
http://en.wikipedia.org/wiki/Genealogy_of_Jesus
Genealogy of Jesus