In outer space, starlight coming from the left is passing through a stationary horizontal tube of length L. Frequency at the left and right ends of the tube is the same. This sameness is true even if the tube is moving in the left and right directions at different uniform speed. In other words, number of waves that exist inside the tube (wave number X L) is invariable. There is no varying in wavelength of light. In the formula, c = f λ, it is f and c that vary. It is the first picture.
In the second picture, there are two tubes the same as above. The two are moving at a constant speed. One is to the left and the other is to the right. As mentioned above, wavelength of light is the same. In the formula, c = f λ, f and c are not the same.