Uber interview question

It was station and train problem