The shortest path between any two nodes in a binary search tree can be found in $O(h)$ where $h$ is the height of the binary tree. This can be done by finding the lowest common ancestor and then finding the distance of both the keys and adding them. For a balanced binary tree height will be $\Theta(\log n).$ So, we get $ a = 0, b = 1 \implies 2^a \times 3^b = 3.$