Daniel B. answered 06/05/21
A retired computer professional to teach math, physics
Let
f0 = 1500 Hz be the frequency generated,
c = 340 m/s be the speed of sound,
vs = 40 m/s be the speed of the truck (the source of sound),
vr = 0 m/s be the speed of the observer (the receiver of the sound).
The source of the sound approaching the receiver causes
the receiver to hear higher frequency f according to the formula.
f = f0(c+vr)/(c-vs)
Substituting actual numbers
f = 1500(340+0)/(340-40) = 1700Hz