Solution (source code)

= Solution

The <centre-of-mass velocity> follows from the total <energy> and <momentum>:
$$
\boxed{\mathbf V_{\mathrm{CM}}=\frac{c^2\mathbf p_{\mathrm{tot}}}{E_{\mathrm{tot}}}
=\left(\frac c2,\frac c2,0\right),\qquad
|\mathbf V_{\mathrm{CM}}|=\frac c{\sqrt2}.}
$$
A boost in this direction with $\Gamma_{\mathrm{CM}}=\sqrt2$ gives zero total spatial <momentum> and total <energy> $\sqrt2\hbar\omega$. The constituent <photons> remain moving at $c$ in that frame.