Diophantine equation ${x ^ 2}+{y ^ 2}+{z ^ 2}={m ^ 2}+{n ^ 2} $ has infinite solutions. What is its general solution formula? Diophantine equation ${x ^ 2}+{y ^ 2}+{z ^ 2}={m ^ 2}+{n ^ 2} $ has infinite solutions. For examples,
$\begin{array}{l}
{1^2}+ {3^2} + {4^2}  = {1^2} + {5^2}\\
{1^2} + {2^2} + {6^2} = {4^2} + {5^2}\\
{322^2} + {562^2} + {597^2} = {601^2} + {644^2}\\
{938^2} + {1063^2} + {4722^2} = {536^2} + {4901^2}\\
 \vdots 
\end{array}$
What is its general solution formula? How to get the general solution formula?

A very simple equation. You can write various combinations.
https://artofproblemsolving.com/community/c3046h1055645_quadratic_diophantine_equation
For the equation:
$$X_1^2+X_2^2=Y_1^2+Y_2^2+Y_3^2$$
Solutions have the form:
$$X_1=t^2+2(p+s-k)t+2k^2+2p^2+4ps-4pk-2sk$$
$$X_2=t^2+2(p+s-k)t+2k^2+2s^2+4ps-2pk-4sk$$
$$Y_1=t^2+2(p+s-k)t+2k^2+2ps-2pk-2sk$$
$$Y_2=t^2+2(p+s-k)t+2ps$$
$$Y_3=2(p+s-k)(t+p+s-k)$$
