A couple of interesting excerpts:
From Clarke's commentary:
Being (as was supposed) the son of Joseph - This same phrase is used by Herodotus to signify one who was only reputed to be the son of a particular person: τουτου παις νομιζεται he was Supposed to be this man's son. Much learned labor has been used to reconcile this genealogy with that in St. Matthew, Matthew 1:1-17, and there are several ways of doing it; the following, which appears to me to be the best, is also the most simple and easy. For a more elaborate discussion of the subject, the reader is referred to the additional observations at the end of the chapter. Matthew, in descending from Abraham to Joseph, the spouse of the blessed virgin, speaks of Sons properly such, by way of natural generation: Abraham begat Isaac, and Isaac begat Jacob, etc. But Luke, in ascending from the Savior of the world to God himself, speaks of sons either properly or improperly such: on this account he uses an indeterminate mode of expression, which may be applied to sons either putatively or really such. And Jesus himself began to be about thirty years of age, being, as was Supposed the son of Joseph - of Heli - of Matthat, etc. This receives considerable support from Raphelius's method of reading the original ων (ὡς ενομιζετο υἱος Ιωσηφ) του Ἡλι, being (when reputed the son of Joseph) the son of Heli, etc. That St. Luke does not always speak of sons properly such, is evident from the first and last person which he names: Jesus Christ was only the supposed son of Joseph, because Joseph was the husband of his mother Mary: and Adam, who is said to be the son of God, was such only by creation. After this observation it is next necessary to consider, that, in the genealogy described by St. Luke, there are two sons improperly such: i.e. two sons-in-law, instead of two sons. As the Hebrews never permitted women to enter into their genealogical tables, whenever a family happened to end with a daughter, instead of naming her in the genealogy, they inserted her husband, as the son of him who was, in reality, but his father-in-law. This import, bishop Pearce has fully shown, νομιζεσθαι bears, in a variety of places - Jesus was considered according to law, or allowed custom, to be the son of Joseph, as he was of Heli. The two sons-in-law who are to be noticed in this genealogy are Joseph the son-in-law of Heli, whose own father was Jacob, Matthew 1:16; and Salathiel, the son-in-law of Neri, whose own father was Jechonias: 1 Chronicles 3:17, and Matthew 1:12.
This remark alone is sufficient to remove every difficulty.Thus it appears that Joseph, son of Jacob, according to St. Matthew, was son-in-law of Heli, according to St. Luke. And Salathiel, son of Jechonias, according to the former, was son-in-law of Neri, according to the latter. Mary therefore appears to have been the daughter of Heli; so called by abbreviation for Heliachim, which is the same in Hebrew with Joachim. Joseph, son of Jacob, and Mary; daughter of Heli, were of the same family: both came from Zerubbabel; Joseph from Abiud, his eldest son, Matthew 1:13, and Mary by Rhesa, the youngest. See Luke 3:27. Salathiel and Zorobabel, from whom St. Matthew and St. Luke cause Christ to proceed, were themselves descended from Solomon in a direct line: and though St. Luke says that Salathiel was son of Neri, who was descended from Nathan, Solomon's eldest brother, 1 Chronicles 3:5, this is only to be understood of his having espoused
NathanNeri's daughter, and that Neri dying, probably, without male issues the two branches of the family of David, that of Nathan and that of Solomon, were both united in the person of Zerubbabel, by the marriage of Salathiel, chief of the regal family of Solomon, with the daughter of Neri, chief and heretrix of the family of Nathan. Thus it appears that Jesus, son of Mary, reunited in himself all the blood, privileges, and rights of the whole family of David; in consequence of which he is emphatically called, The son of David.
(My correction and bold)
From Biblical Illustrator:
The following possible explanation of the divergencies between the two genealogies of our Lord is deserving of consideration. The Jews, like other nations, gave more than one name to each individual. The life of a Jew was essentially twofold: he was a member of a civil state, and he was at the same time a member of a theocracy; his life was both political and religious. This distinction seems to have been preserved in the giving of names. Traces of the double name are found throughout the course of Scripture history. It is highly probable that the sacred name imposed at birth would be entered in a different list from the common name by which a man was known in his civil relationships. The conclusion to which we are brought is that we have before us two such registers, one drawn from public, and the other from private sources; or, as is conjectured above, one from a civil genealogy, the other from writings laid up in the Temple. In support of this view, we may note that in the genealogy in Luke — the evangelist whose opening chapters show a close familiarity with the interior of the Temple, and what took place there — the names appear to have a sacred character. Even an English reader may remark at a glance the different aspect of the two lists. That in Luke contains, with striking frequency, the familiar names of distinguished patriarchs, prophets, and priests, and thus confirms the impression that his genealogy, rather than that of a Matthew, is of a purely religious character. This hypothesis receives a remarkable confirmation by a comparison of the dates of the two lists with the dates of the first building, the destruction, and the second building of the Temple. What, then, is the relation between the two genealogies before Solomon's time, when there was no Temple? and during the lives of Salathiel and Zorobabel, who flourished at the time of the Babylonish captivity, when again, for seventy years, there was no Temple? It is precisely at these periods that only one list exists. The divergence in Luke's genealogy from that of Matthew is exactly coincident with the periods during which the Temple was standing. What explanation of this striking fact can be more natural than that at the point where the two genealogies unite there was but one list to refer to, and that the absence of entries in the sacred register required it to be supplemented by a reference to the state chronicles?