Thought experiment on Special Relativity (SR) 
Hi I have been reading up and trying to understand special relativity. I've thought of this question and I am not quite sure what I am not understanding right.
Disclaimer: I'm quite new to this topic and I apologize if it does not make sense!
Context to my question
In this scenario, we have a train of length 120m travelling towards the platform at a certain speed such that length contraction is significant. The red box marked with an "X" is a 10m piece of track contains a pressure bomb that will explode if the train is no longer in contact with the track. The total length of the platform including the "bombed track" is 110m.
At the end of the platform, it is indicated by the arrow "stop here".
Confusion
Because of length contraction, the stationary observer will observe the length of the train contracted in the direction of motion of the train by a certain amount depending on the Lorentz factor. Let's assume the observer sees the train contract by 20m and the final length is 100m. By the time the train reaches the stopping point, the back end of the train will no longer be in contact with the red track and the observer will see the bomb go off. (the 100m train is < 110m total track length. Thus, bomb explodes
However, if we now take the reference frame of the moving train, the captain in the train will not see itself and the train as being contracted, but rather the surrounding train track that moves relative to him will be contracted. Thus, what he will see is that the total length of the platform now contracts by the same amount of 20m thus becoming 90m, while his train remains the same length at 120m. Thus, when he reaches the end of the shortened track, the back of the train will still be in contact with the red piece of track (Since 120m train > 90m total track length). Therefore, the bomb from his perspective should not explode.
So, why is it that at the same final situation where both of them reach the end of the track, the observer will see that the bomb should explode and the captain dead. While the train captain from his perspective, will think that the bomb shouldn't explode and he should remain alive
 A: I have tried to illustrate your description of what I believe to be different situations (or Stop conditions as you describe it) from the point of view of (the Front of the train). An observer on the ground (platform).
In the first diagram below I label the blue line as the world line of the front of the train and the purple line for the back of the train. A and B is at time $t=0$ And C and D correspond to when the front of the train and back end of the train at some time t later when front of the train hits the end of the platform, and presumably the bomb explodes. No problem so far.

Now look at the second diagram where we have Lorentz transformed everything to the Train’s point of view, first of all the train is a bit longer now and platform is a bit shorter (including the pressure plate), but more importantly look at where B is now, it’s actually at a different time as A. The back of the train at t=0 from the ground’s perspective is not simultaneous as A when viewed from the train’s perspective. So C, D is the event as viewed from the ground’s perspective but what you are describing in your second situation is actually C, D’, NOT C, D.

In other words the train stopping front and back simultaneously in the train perspective is actually a train that is getting longer from the ground’s perspective. The front and back from the ground’s perspective will not stop simultaneously. From the diagram you can see that the purple line keeps going forward a little bit more before hitting D. In addition D is always after the pressure plate in the two diagrams.
I’d like to emphasize that the reason for your confusion is because It’s not just length that changes but time as well and that simultaneous events in one picture are often not in another inertial frame. In this case, every part of that train is at a different time coordinate depending on who the observer is because they are at different positions.
I hope that helps with the confusion, if anyone can spot any errors please let me know and I’d be happy to edit the diagrams.
