I am having trouble on trying to prove this statement using induction. Given a tree with $n$ vertices with $n \geq 2$. $x$ is a fixed vertex, for each $v$ in the vertex set, $d(v,x)$ is the length of the unique path from $v$ to $x$ in the tree.
I know that a tree with at least $2$ vertices has at least $2$ leaves, meaning at least $2$ vertices with degree $1$. Every tree has $n - 1$ edges. If I remove $1$ leaf, I now have $n - 2$ edges. That's as far as I got. I'm not sure how to proceed. I know my goal is to reach ${k + 1 \choose 2}$.
$$\sum d(v, x) \leq {n \choose 2}$$
Assume that, for some integer $k\ge 2$, for all trees with $k$ vertices, for all vertex $x$ in this tree, the tree satisfy that
$$\sum_{v\in \text{vertex set of that tree}} d(v,x) \le \binom{k}{2}.$$
For the $n=k+1$ case, consider any tree with $k+1$ vertices and $k$ edges. Let $V$ be the set of all its vertices.
Pick a leaf $l\in V$ that is not the fixed vertex $x$. (Always possible as the question mentions that such tree has at least $2$ leaves.) The path length $d(l, x) \le k$, the number of edges.
Remove $l$ from the vertices, then the subtree has $k$ vertices and $k-1$ edges. By the induction hypothesis,
$$\begin{align*} \sum_{v\in V\setminus \{l\}} d(v,x) &\le \binom{k}{2}\\ \sum_{v\in V} d(v,x) &= d(l, x) + \sum_{v\in V\setminus \{l\}} d(v,x)\\ &\le k + \binom k2\\ &= \binom k1 + \binom k2\\ &= \binom{k+1}2 \end{align*}$$