About Cainan .
This is the Post-diluvian Cainan, mentioned in Luke 3:36-37 and the Septuagint (i.e. not part of the Jewish texts). Luke has him listed as an additional generation between Arphaxad and Shelah. We follow the earlier source in this tree, making Shelah his brother, instead of his son. Follow the lineage there.
This Cainan was the great-grandson of Noah, not to be confused with the first Cainan, who lived 10 generations earlier, and was the great-grandson of Adam.