Here, the frequency of whistle
v = 400 Hz
Speed of sound v = 340 ms-1
Speed of train, vs = 10 ms-1
(i) (a) When the train approaches the platform, i.e., the observer at rest.
Then,

(b) When the train approaches the platform i.e., from the observer at rest;

(ii) Speed of the sound does not change, therefore, it is again 340 ms-1.