find the common ancestor of two nodes in a binary tree