To develop this problem it is necessary to apply the concepts related to the Dopler Effect.
The apparent frequency can be calculated through the expression

Where,
v = Velocity of the sound or light
Velocity of the observer
f=Real frequency
Our values are given as,



PART A ) Towards the factory we need to apply the plus sign



PART B ) Away from the factory we need to apply the minus sign


