The analysis of the following situation may prove instructive. The person on
the train measures the speed of light by sending the beam crosswise - from one
side to a mirror on the other etc. There are two possibilities:
1. The person DOES NOT KNOW that the train is moving with a speed v with
respect to the railway. So he/she obtains c' = x'/t, where x' is the distance
between the sides of the train and t is the time measured.
2. The person KNOWS that the train is moving with a speed v with respect to the
railway and accordingly determines the "real" distance x the beam has gone
through:
x^2 = (x')^2 + (vt)^2
Eventually he/she calculates the "real" speed of light: