Union Pacific Interview Question

know when to plug the train