The statement is meant to look a little intimidating, but the problem itself is
quite simple. When you root the tree at r1 and r2, there are some subtrees
$T_{r1}(u)$ and $T_{r2}(u)$ that are the same in both trees. These subtrees are
easily obtainable by just choosing the same node in both cases. The nodes where
the subtrees are different lie along the path from r1 to r2. Here, we can
choose any subsegement of this path and take the path and all its descendants.

Therefore, if there are k nodes between r1 and r2 (inclusive), then the answer
is n + (k choose 2).
