It's stated in my textbook that relativistic mass is conserved in collisions, even in inelastic ones. So if you have a particle with rest mass $m$ moving with speed $u$ (considerable fraction of the speed of light) in the lab frame and it collides with a stationary particle (as seen in lab frame) also of rest mass $m$ and it is given that the two particles coalesce into a new particle with rest mass $M$ (that moves with speed $v$ in the lab frame), then we can say that:
$\gamma(u)m+m=\gamma(v)M$
This is pretty much exactly what's written in my textbook. However, this inevitably leads to:
$\gamma(u)mc^2+mc^2=\gamma(v)Mc^2$
Therefore, this seems to show that the collision is elastic, as no energy is lost.
This has left me very confused, especially since it's shown here as well: http://www.feynmanlectures.caltech.edu/info/solutions/inelastic_relativistic_collision_sol_1.pdf
Could someone please help me to make sense of this?