Two trains A and B are approaching each other with $108 km {h}^{-1}$ and $126 kg {h}^{-1}$ respectively. If the train 'A' sounds a whistle of frequency 500 Hz, find the frequency of the whistle as heard by a passenger in the train 'B'.
(a) before the trains cross each other and
(b) after the trains cross each other. (Take velocity of sound as $330 {ms}^{-1}$)