Special Relativity Thought Experiment

I’m not sure if this thought experiment actually checks out!