Find first common parent for two nodes