Hop out of the train, and take a close look at the switch.
Check the area around you.
There is a hexagonal socket in the switch.
You'll find a hexagonal bar in a box on the ground.
Put the bar in the socket.
You will need the wrench from the train.