I find it hard to believe that there was no word for that kind of thing but this source explains that Jesus' genealogy is harmonized by that claim. I really want that claim to be true and solidly backed up. I'm at a loss as to how to find out how to back up that claim though.
In the Bible the Greek word ‘hyuos’ which translates into English as ‘son’ can also mean a legitimate son, a son artificially constituted, a descendant, a son as implying connection in respect of membership, service, resemblance, manifestation, destiny, etc. (Source: Wm.D.Mounce Interlinear)
With regard to Luke 3:23: “Jesus was known as the son of Joseph. Joseph was the son of Heli.”
NLT Study Bible Note: “If this is actually Mary’s genealogy, then Joseph was Heli’s son-in-law, a possible understanding of the Greek sentence.”
ESV Study Bible Note: “Some commentators have suggested that Heli was Mary’s father, but that there were no male heirs in the family, so Heli adopted Joseph as his “son” when Mary and Joseph were married.”
I hope someone who actually knows Greek will be able to give you a satisfactory explanation as to whether there was a word for "son-in-law."
As far as I know, Luke is recording Mary’s genealogy and Matthew is recording Joseph’s. Matthew is following the line of Joseph (Jesus’ legal father), through David’s son Solomon, while Luke is following the line of Mary (Jesus’ blood relative), through David’s son Nathan. Regarding Matthew's genealogy, this article may be helpful: https://www.gotquestions.org/14-generations.html
You will find son-in-law is translated as 'gambros' in the Septuagint - e.g. Gen 19:12 (see this citation. This is referenced in While the Bridegroom is With Them, p. 14) seen here and summarized in this wiktionary entry. https://en.wiktionary.org/wiki/γαμπρός)
Alternative forms γαμβρός m (gamvrós) (uncommon)
From earlier γαμβρός (gamvrós), from Ancient Greek γαμβρός (gambrós), from Proto-Indo-European *ǵeme-.
Noun γαμπρός • (gamprós) m (plural γαμπροί)
son-in-law, specifically daughter's husband
brother-in-law, specifically sister's husband
The Septuagint was the Greek translation of the Old Testament, which the New Testament writers were familiar with. So I'm quite sceptical of the claim that there was no word for son-in-law in Greek.