[guided]We start with two arbitrary points of the product space because the theorem asserts an equality of distances for every pair of points. Let
\begin{align*}
x=(x_1,\dots,x_m), \quad x'=(x_1',\dots,x_m'), \quad y=(y_1,\dots,y_n), \quad y'=(y_1',\dots,y_n').
\end{align*}
The Euclidean metric on $\mathbb{R}^m$ is defined by taking the square root of the sum of squared coordinate differences, so its square is
\begin{align*}
d_m(x,x')^2=\sum_{i=1}^{m}(x_i-x_i')^2.
\end{align*}
Likewise, the Euclidean metric on $\mathbb{R}^n$ gives
\begin{align*}
d_n(y,y')^2=\sum_{j=1}^{n}(y_j-y_j')^2.
\end{align*}
The metric $d_2$ is the $\ell^2$ product metric, so it combines the two factor distances by the same square-sum rule:
\begin{align*}
d_2((x,y),(x',y'))=\left(d_m(x,x')^2+d_n(y,y')^2\right)^{1/2}.
\end{align*}
Squaring this nonnegative quantity and substituting the two Euclidean distance formulas gives
\begin{align*}
d_2((x,y),(x',y'))^2=\sum_{i=1}^{m}(x_i-x_i')^2+\sum_{j=1}^{n}(y_j-y_j')^2.
\end{align*}
This is the expression we will compare with the Euclidean distance after concatenating coordinates.[/guided]