I have seen time dilation explained more or less in this way:
If you are in a rocket, racing a photon, and your rocket is almost at the speed of light, technically you would see the photon moving away at way less than the speed of light. But that doesn't happen, because the speed of light is always the same. To solve this problem, your time would dilate, so you would still see the photon moving away at speed of light, and you would experience time slower.
I think this case makes sense. But what if the photon was moving in the opposite way? What if instead of moving away from the rocket, it was actually coming towards it from far away? Technically, the pilot would see the photon moving at more than the speed of light (the sum of speed of light and the velocity of the rocket).
I suppose that is also impossible, as the speed of light is always constant. But if the pilot's time were to dilate in this case (be experienced slower), wouldn't he perceive the photon even faster than before (even faster than speed of light and speed of rocket combined)?
How do I approach this problem? Would time dilate or contract in this case?