I listed the questions with my answers. Are the answers correct? Thanks.

A railroad locomotive is a rest with its whistle shrieking, and then it starts moving toward you.

a.) Does the frequency that you hear increase, decrease, or stay the same?

The frequency of the waves increases as the waves are compressed in front of the locomotive.

b.) How about the wavelength reaching your ear?

The wavelength is compressed, producing a higher sounder heard.

c.) How about the speed of sound in the air between you and the locomotive?

The speed of sound is a constant, so it does not change.

a.) The frequency that you hear actually increases as the locomotive approaches you. This is known as the Doppler effect, a phenomenon where the perceived frequency of a sound wave changes if the source of the sound is moving relative to the observer. In this case, as the locomotive moves towards you, the sound waves get compressed, leading to a higher frequency.

To calculate the change in frequency due to the Doppler effect, you can use the following formula:
f' = f * (v + v₀) / (v + vₛ)

Where:
f' is the observed frequency
f is the emitted frequency
v is the velocity of sound in air
v₀ is the velocity of the observer
vₛ is the velocity of the source

b.) The wavelength reaching your ear will indeed decrease. Since the speed of sound remains constant and the frequency increases, according to the wave equation v = λ * f, the wavelength (λ) must decrease to maintain the speed of sound.

c.) The speed of sound in the air between you and the locomotive remains constant. The speed of sound depends on the medium through which it travels, such as air, water, or solid materials. In this case, assuming there are no changes in air temperature or pressure, the speed of sound in the air remains constant.