I need to show that
$$2m(R\textbf{x})\cdot \textbf{a} +m\|R\textbf{a}\|^2=m\|R\textbf{x}\|^2+m\|R(\textbf{a}-\textbf{x})
\|^2$$
Here $R=I-P$ where $P=UU^T$, and $\textbf{a},\textbf{x}\in\mathbb{R}^m$, and $ \|*\|$ is the $L_2$ norm.
I can expand this to $$2m(R\textbf{x})\cdot \textbf{a}+m(\textbf{a}^TR^TR\textbf{a}) = 2m(R^TR\textbf{x})\cdot \textbf{a}+m(\textbf{a}^TR^TR\textbf{a})$$
But I'm not sure where to go from here. Do I need to multply by $\textbf{x}^T $ some where?
This comes from this proof
Just expand: $$(a-x)^TR^TR(a-x) = a^T R^T R a + x^T R^T R x + a^T R^T R x + x^T R^T R a$$
Assuming $U$ has orthogonal columns: $$R^TR = (I-UU^T)(I-UU^T) = I-UU^T = R$$
Substituting above: $$(a-x)^TR^TR(a-x) = a^T R^T R a + x^T R^T R x + a^T R x + x^T R^T a$$ $$(a-x)^TR^TR(a-x) = a^T R^T R a + x^T R^T R x + 2 Rx.a$$ $$||R(a-x)||^2 = ||R a||^2 + ||R x||^2 + 2 Rx.a$$
The above is the equation used in the picture you mentioned in the question. Hope above helps. But in the equation you mentioned in the question there is a sign flip. Let me know exactly what is the equation.