Suppose there is an observer sitting in the middle of a moving train, and another obsever outside on a platform. When this train passes the outside observer, so that the ends of the train are equidistant from the outside observer, a flash of light is emitted from both ends. This can be the commonly used lightning strike or just some light pulse.
I reconstructed this scenario in desmos. The outside observer sees both lights at the same time and upon measuring the distances concludes that they flashed simultaneously. The observer inside the train, however, sees the light on the right flash and then the light on the left and concludes that the lights did not flash simultaneously. This makes sense since Einstein postulates that the speed of light must remain constant in all reference frames and the observer in the train is moving towards and away from the flash on the right and the flash on the left, respectively.
I constructed an alternate scenario in desmos as well. This is essentially the same scneraio, just viewed from the inertial reference frame of the observer sitting inside the train cart. In this case, the observer inside sees the 2 lights flash simultaneously and the observer outside sees them flash in a different order.
Are these scenarios equivalent? If no, why not? If yes, how is it possible that the same observer sees the events play out in a different order? Which is the correct order?
And most importantly, what do each of the observers see?