Solution (source code)

= Solution

Put $\varepsilon=\hbar\omega$. The total <four-momentum> of the perpendicular <photons> is
$$
P_{\mathrm{tot}}=\left(\frac{2\varepsilon}{c},\frac\varepsilon c,\frac\varepsilon c,0\right).
$$
Although each constituent is massless, the sum has $P_{\mathrm{tot}}^2=2\varepsilon^2/c^2$. Its <invariant mass> is therefore
$$
\boxed{M_{\mathrm{sys}}=\frac{\sqrt2\,\hbar\omega}{c^2}.}
$$
The rest <energy> is the total <energy> in the frame where the two <photon> <momenta> cancel, not the sum of individual <photon> rest <energies>.