The answer is common ancestor.
Since these two organisms are adapted to different environments and still have structural similarities, that means that they must have a common ancestor. Common ancestor is an ancestral organism that two or more descendant lineages have in common.