Final answer:
The mistake is in assuming that the velocity, Δs/Δt, stays the same in both frames of reference. The correct velocity transformation between frames is given by the Lorentz transformation equations.
Step-by-step explanation:
The mistake in your calculation is in assuming that the velocity, Δs/Δt, stays the same in both frames of reference. In reality, the velocity does not add up in a simple way as in classical mechanics. According to the Lorentz transformation equations, the correct velocity transformation between frames is given by:
v' = (v - u) / (1 - v*u/c^2)
where v is the velocity of the train as observed from the outside frame, u is the velocity of the train as observed from the inside frame, v' is the velocity of the light beam as observed from the outside frame, and c is the speed of light.
By plugging in the values from your example, where v = L0γ/T0 and u = cγ^2, you will find that v' equals c, confirming that the speed of light is the same in both frames of reference.