You can solve these sort of problems using four-momentum algebra. In c = 1 units, the four momentum of a particle, Pf, is:
Pf = (E, P)
E is the energy and P is the momentum. P has 3 components so Pf has four components. Pf transforms as a four-vector under Lorentz transformations. The inner product of two four momenta:
Pf1 = (E1, P1)
Pf2 = (E2, P2)
is defined as:
Pf1 dot Pf2 = E1 E2 - P1 dot P2
where P1 dot P2 is the ordinary inner product of the ordinary momenta P1 and P2.
This inner product is invariant under Lorentz transformations. We denote the inner product of a four-vector Pf with itself as Pf^2. Also ordinary inner products of ordinary vectors with themselves are denoted as a square. Let's take a closer look at the square of a general four-momentum
Pf^2 = E^2 - P^2
This is invariant under Lorentz transformations i.e. it's value is the same in all frames. If we ...
The solution is derived from first principles using four-momentum algebra.