We can solve the problem by using the Doppler effect formula, which gives us the shift in frequency of a sound when the source is moving:

where
f' is the apparent frequency
v is the velocity of the wave

is the velocity of the source relative to the observer
f is the original frequency
In our problem, f=400 Hz is the original frequency of the train's horn, f'=429 Hz is the apparent frequency read by the app, and v=330 m/s is the velocity of the wave (the speed of sound). If we re-arrange the formula, we can calculate v, the speed of the train:

where the negative sign means the train is moving toward the two children.
In miles per hour, the velocity of the train is:
