If I have a closed box of length 299,792,458 metres fitted with mirrors on opposite sides inside the box that are reflecting light vertically (up down) again and again, then what will happen if I move the box to my right while the photon is halfway between the mirrors? Will the photon move with the box? If so, then how? The photon takes one second to travel from one mirror to another. What will happen if i move the box in the direction which light is going as in the diagram. Will the photon never reach the top mirror?
The easiest way of seeing what happens is to draw a space-time diagram. The stationary box walls form two vertical parallel lines with a 45 degree zigzag path for the photon as it bounces between them.
When you move the box the photon will not change speed - relativity tells us that light always move at lightspeed no matter what inertial coordinate system you use. The result is just that the approach to one side gets delayed (as seen by us who are not moving with the box) since the wall is receding as the photon tries to catch up, and the approach to the other side speeded up since the wall is approaching while the photon moves towards it. Overall there will be fewer bounces as the box is moving: we would say there has been a time dilation for the box.