v}$ joining $u$ and $v$ in $T_1$, we obtain the equality $$d_{w_1} (u, v) = d_{w_2}(f(u), f(v)).$$ Hence, $f$ is an isometry of the metric spaces $(V(T_1), d_{w_1})$ and $(V(T_2), d_{w_2})$.

Conversely, let $f$ be an isometry of $(V(T_1), d_{w_1})$ and $(V(T_2), d_{w_2})$. Then it is easy to see that $f$ is an isomorphism of weighted trees $T_1(w_1)$ and $T_2(w_2)$ if and only if $f$ is an isomorphism of free (unweighted) trees $T_1$ and $T_2$. To prove that $f$ is an isomorphism of $T_1$ and $T_2$ it suffices to show that the implication $$\label{t3.4:e1}
(\{u_1, v_1\} \in E(T_1)) \Rightarrow (\{f(u_1), f(v_1)\} \in E(T_2))$$ is valid for all $u_1$, $v_1 \in V(T_1)$. Indeed, implies $$E(T_2) \supseteq \{\{f(u_1), f(v_1)\} \colon \{u_1, v_1\} \in E(T_1)\}.$$ Since $f$ is bijective, we have $|V(T_1)| = |V(T_2)|$. Moreover, since $T_1$ and $T_2$ are trees, the equalities $|V(T_1)| = |E(T_1)| + 1$ and $|V(T_2)| = |E(T_2)| + 1$ (see, for example, [@Die2005 Corollary 1.53]) hold. Consequently, we have $$\label{t3.4:e2}
|E(T_1)| = |E(T_2)|.$$ Now from and it follows that $$(\{u_1, v_1\} \in E(T_1)) \Leftrightarrow (\{f(u_1), f(v_1)\} \in E(T_2)).$$

Let us prove . Suppose contrary that $\{f(u_1), f(v_1)\} \notin E(T_2)$. Then there exists a path $P^{2} = (v_1^{*}, v_2^{*}, 