Hint: There are n−1 pairs u,v with d(u,v)=1; in all
other cases d(u,v)≥2.
Let k=(2n) and let
x1≤x2≤⋯≤xk be the distances between the
pairs of vertices in the tree T. Thus
W(T)⋅H(T)=(x1+x2+⋯+xk)⋅(x11+x21+⋯+xk1).
Since the tree has exactly n−1 edges, there are exactly
n−1 pairs of vertices at distance one, that is,
x1=x2=⋯=xn−1=1. Thus
W(T)⋅H(T)=(n−1+xn+xn+1+⋯+xk)⋅(n−1+xn1+xn+11+⋯+xk1)==(n−1)2+(n−1)((xn+xn1)+⋯+(xk+xk1))++(xn+⋯+xk)(xn1+⋯+xk1).
From Cauchy inequality we have
(xn+⋯+xk)(xn1+⋯+xk1)≥(1+1+⋯+1)2=(k−n+1)2=4(n−1)2(n−2)2.
The equality holds if and only if
xn=xn+1=⋯=xk.
Now we minimize the expression
(xn+xn1)+⋯+(xk+xk1), where
xi∈[2,n−1].
It is clear that the minimal value is achieved for
xn=xn+1=⋯=xk=2. Therefore we get
W(T)⋅H(T)≥(n−1)2+(n−1)(2+21)(k−n+1)+4(n−1)2(n−2)2=4(n−1)3(n+2).
The equality holds for x1=⋯=xn−1=1 and
xn=xn+1=⋯=xk=2, that is, the smallest value is
achieved for the tree where n−1 pairs are at distance one,
and the remaining k−(n−1)=2(n−1)(n−2) pairs are at
distance two. The unique tree which satisfies these conditions is
the star graph Sn. In this case it holds
W(Sn)⋅H(Sn)=(n−1)2⋅4(n−1)(n+2)=4(n−1)3(n+2).