Let the length of the train be x meters, the meeting time with A be 15s, and the train speed be x/ 15- 1.
B The round trip time is 17 seconds, and the train speed is x/ 17+ 1.
Equation: x/15-1= x/17+1.
Solution: x=255