Final answer:
The frequencies heard by a stationary person at the side of the tracks change as the train approaches and passes due to the Doppler effect. The train's engineer hears a constant frequency due to their motion with the train.
Step-by-step explanation:
The frequencies observed by a stationary person at the side of the tracks as the train approaches and after it passes depend on the Doppler effect. As the train approaches, the frequency of the sound waves will be higher, resulting in a higher pitch. After the train passes, the frequency will be lower, resulting in a lower pitch.
On the other hand, the train's engineer traveling on the train will hear a constant frequency. This is because the engineer is moving with the train, so there is no relative motion between them and the sound waves.