Inelastic collision; relativity

My text explains the relativistic inelastic collision of two masses.

In the left picture we see to masses colliding to a single mass M that doesn't move. In the right picture we see the exact same situation in a different reference frame moving in the y-direction.

What they say is, we have the following equations concerning the y-direction:

$p_{intial}=2m\gamma u \\ p_{final}=Mu$

They take the limit $u \to 0$, and they say what we can therefore conclude that $\gamma=\frac{1}{\sqrt{1-\frac{w^2}{c^2}}}$. But why didn't we know this before taking the limit? In the proof, we are already familiar with the relativistic formula for momentum; why do we need to find an expression for $\gamma$ by taking a limit? Isn't $\gamma$ already determined by the velocity in the x-direction? Isn't the $v$ in $\gamma$ always that velocity? Anyhow, they say it's because of this we can conclude that $M=2\gamma m$. Could someone help me with this? (I cannot quote my book literally, because it is in Dutch, but I can give a more precise translation if necessary.)

• You should be aware that there are two ways of talking about mass in relativity. The text you are using appears to be one that uses the notion of relativistic mass. However, most modern treatments have discarded that notion as unnecessary and conducive to mental error ; the modern method defines the mass as the invariant square of the energy momentum four vector (to within appropriate factors of $c$). Jan 13 '17 at 20:12
• @dmckee Right, I've heard that before, but for now I'm just going with the textbook my university provides me with, because I don't have the time to explore this other approach. I would still appreciate it a lot if you could elaborate on my question. Jan 13 '17 at 20:24

In the new frame moving in the negative y-direction, the gamma factor that enters in the equations for momentum involves the velocity $\vec{w} + \vec{u}$. But in the limit of $\vec{u}\to \vec{0}$ this becomes $\gamma_w$, i.e. the gamma factor corresponding to the velocity of the masses in the original frame. That's the whole point here, it's just all about avoiding having to work with the full expression of the gamma factor when in the limit you're about to take it will just become the same gamma factor as in the original frame.
Then what dmckee says in the comments may not be relevant, while it's true that there should be a gamma factor $\gamma_u$ corresponding to the speed $\vec{u}$ of the mass $M$ in the equation for the final momentum, we're going to take the limit of $\vec{u}\to\vec{0}$ anyway, so this becomes equal to $1$.