The speed of sound of the whistle is
Key idea (from the passage): Trains A and B move in the same direction at m/s and m/s, with B ahead. The whistle is on A's front engine. Sound travels at m/s relative to still air. Speed relative to an observer (speed relative to ground) (observer's velocity).
Answer: (B) 360 m/s for A and 310 m/s for B
Tagged Doppler effect in sound. Machine-assigned, so read it as a strong shortlist rather than a verdict.