Get invariant mass

Ok I did it by calculating it getting the total energy and the total momentum