This problem can be solved by brute force approach by applying multiple Lorentz boosts in sequence. However, it can be also solved by using 4-invariants for the 4-velocities of the spaceship. The latter method is mathematically shorter. Be careful in your calculations as the relativistic addition of non-parallel velocities is not commutative.
Please submit the solution to this problem via e-mail to physcs.cup@gmail.com. The next hint for the Problem 4 will be published at 13:00 GMT, 19th March 2023, together with the next updates of the intermediate results.