It is convenient to consider all the photons sent by the rocket engine into one direction as a single body (which therefore consists of many photons all moving in the same direction). The components of the 4-momentum of this set of photons can be used to write down the conservation laws.
Please submit the solution to this problem via e-mail to physcs.cup@gmail.com. The next hint for the Problem 3 will be published at 13:00 GMT, 13th February 2022, together with the next updates of the intermediate results.