Frequency of Beats

While Jane waits on a railroad platform, she observes two trains approaching from the same direction at equal speeds of 8.40 m/s. Both trains are blowing their whistles (which have the same frequency), and one train is some distance behind the other. After the first train passes Jane, but before the second train passes her, she hears beats having a frequency of 3.70 Hz. What is the frequency of the trains' whistles? (Assume that the speed of sound in air is 343 m/s.)

I know that F(b)=F(b)-F(a)

Other than that I don't really know how to start this problem at all :(

The whistle from the first train is detected by Jane's ear at a lower frequency, while the one from the second train is perceived at a higher frequency. This is due to the Doppler effect. The interference of those close frequencies in time results in beats. So, you should:

1. Set up the formula of the Doppler effect for both cases.
2. Combine them in the beat frequency equation.

You'll get an equation with one unknown that you are able to solve for.