I think the expression is not correct, it is twice the KE.
But it is a nice tricky problem, so I step further.
The velocities are vectors,
[tex]\vec v_{ij}=\vec v_i-\vec v_j[/tex]
[tex]m_i m_j \vec v_{ij}^2=m_i m_j(\vec v_i^2+\vec v_j^2-2 \vec v_i \vec v_j)[/tex]
The numerator of the original expression is
[tex]N=m_1 m_2\vec v_{12}^2+m_2 m_3\vec v_{23}^2+m_3 m_1\vec v_{31}^2=m_1 m_2(\vec v_1^2+\vec v_2^2-2 \vec v_1 \vec v_2)+m_2 m_3(\vec v_2^2+\vec v_3^2-2 \vec v_2\vec v_3)+m_3 m_1(\vec v_3^2+\vec v_1^2-2 \vec v_3\vec v_1)[/tex]
Upon rearranging ,
[tex]m_1v_1^2 (m_2 +m_3 )+m_2 v_2^2 (m_1+m_3 )+m_3 v_3^2 (m_1+m_2 )-2(m_1 m_2\vec v_1\vec v_2+m_2 m_3 \vec v_2\vec v_3+m_3 m_1\vec v_3\vec v_1)[/tex]
Here comes the trick:
[tex]m_1v_1^2 (m_2 +m_3 )=m_1v_1^2 (m_1+m_2 +m_3 )-m_1^2v_1^2[/tex]
so
[tex]N=(m_1v_1^2 +m_2v_2^2+m_3v_3^2)(m_1+m_2 +m_3)-(m_1^2 v_1^2+m_2^2 v_2^2+m_3^2 v_3^2+2 m_1m_2 \vec v_1 \vec v_2+2 m_2 m_3 \vec v_2 \vec v_3+2m_3 m_1 \vec v_3\vec v_1)[/tex]
Let be the total mass M.
The first term is 2M KE. The second term is the square of the total momentum, (Ʃmivi)^2=P^2, and we know that the KE of the CM is KECM=P^2/(2M)
The original expression is
[tex]\frac{m_1m_2 \vec v_{12}^2+m_2 m_3 \vec v_{23}^2+m_3 m_1 \vec v_{31}^2}{M}=2KE-2KE_{CM}[/tex]
twice the KE with respect to the CM. The factor 2 is missing from the original expression.
ehild