timeserver said:
One important aspect of talking about relativistic physics is that mass is not conserved.
Rest mass (invariant mass is) conserved.
Before the box has emitted the photon you have
p^\mu = (m_B c^2,0)
After the box has emitted the photon you have
p^\mu = (E_B + E_\gamma,0)
The momentum of box and photon cancel.
For the energy that means
m_B c^2 = E_B + E_\gamma
(m_B c^2 - E_\gamma)^2 = E_B^2
(m_B c^2)^2 + E_\gamma^2 - 2 m_B c^2 E_\gamma = (m^\prime_B c^2)^2 + c^2p_B^2
Momentum of photon and box (squared) are equal, p = E/c for photons, therefore
(m_B c^2)^2 + E_\gamma^2 - 2 m_B c^2 E_\gamma = (m^\prime_B c^2)^2 + c^2p_\gamma^2 = (m^\prime_B c^2)^2 + E_\gamma^2
I introduced m' for the box after the photon has been emitted.
(m_B c^2)^2 - 2 m_B c^2 E_\gamma = (m^\prime_B c^2)^2
2 m_B E_\gamma = c^2[m_B^2 - {m^\prime_B}^2]
Now we could introduce the 'relativistic mass of the photon' using M = E/c²
2 m_B M_\gamma = m_B^2 - {m^\prime_B}^2
It is clear that masses do no longer add up as usual (thanks to DrStupid for that remark). In addtion it does not help to introduce the 'relativistic mass of the photon'. I think it is confusing in this context.
What is more interesting is to express the rest mass of the box after the emission of the photon using m and E
{m^\prime_B}^2 = m_B^2\left(1- \frac{2 E_\gamma}{m_bc^2}\right)
Of course the rest mass of the box itself is an upper bound for the photon energy :-)