When the truck is driving towards Junior the sound waves it emits have a shorter wavelength and when it is driving away, sound waves have a longer wavelength. This is known as the Doppler effect. The wavelength is inversely proportional to frequency so if the wavelength is getting bigger the frequency will be smaller. Also, if the wavelength is getting smaller, the frequency is going to be bigger.
a) When the truck is driving towards Junior:
F={v/(v-Vs)}*f, where F is the frequency Junior hears, Vs is the speed of the source or in this case the truck and is Vs=27 m/s, v is the speed of sound and it is v= 340 m/s, and f is the frequency of the sound of the truck and it is f= 85.0 Hz.
When we plug in the numbers we get:
F={340/(340-27)}*85=92.33 Hz
We see that the frequency has increased because the wavelength of the sound waves has decreased.
b) When the truck is moving away we replace the minus in the denominator with a plus and get:
F={v/(v+Vs)}*f= {340/(340+27)}*85=78.75 Hz.
We see that the frequency has decreased because the wavelength has increased.