Train Length Puzzle

Here is another Presh Talwalkar problem that seems unsolvable at first glance.

“Every day, a train passes a train station along a straight line track, and the train moves at a constant speed. Two friends, A and B, want to determine how long the train is. Lacking proper equipment, they devise the following method. They first synchronize their walking. Both A and B walk at the same constant speed, and each step they take is the same length. One day they line up back to back at the train station. When the front of the train reaches them, they both start walking in opposite directions. Each person stops exactly as the back of the train passes by. If person A takes 30 steps, and person B takes 45 steps, how long is the train, in terms of steps?”

Answer.

See the Train Length Puzzle for a solution.