In French, Special Relativity, pg. 16-17, the 'Einstein's box' thought experiment is explained. It starts with a box of length $L$, mass $M$ and we emit photons from one end that have energy $E$. Then it's argued that the box moves opposite to the direction of the photons by an amount $\Delta x = \frac{E L}{M c^2}$. And then, since we suppose it's an isolated system, we say that the center of mass hasn't moved and argue that the photons must have carried some mass $m$ with them. My problem is that I can't make sense of the calculation for this center of mass. Here's the picture from the book.
We fix the origin at the left end of the box. At (a) the center of mass is in $L/2$. In (b) we have the box of mass $M-m$ that is centered at $L/2 -\Delta x$ and the photons of mass $m$ that have reached $L-\Delta x$. So the center of mass in (b) will be in
$$ (M-m) (L/2-\Delta x)+m(L-\Delta x)$$
all over the total mass $M$. Equating this with the center of mass in (a) gives $$m = \frac{2 M \Delta x}{L}$$ which is a factor of two off the correct result. Where am I wrong?
