How do we know that galaxies farther away from us are moving faster than nearby galaxies?
Astronomers use the Doppler Shift to determine the speed at whih a source of light is moving. The faster the source moves, the greater the shift in the colour of the light we observe (compared to the colour of a stationary source).
Anyone who has listened to a train approaching and passing on a track has been aware of the change in sound pitch that occurs. This effect is known as the Doppler Shift, and is well understood for all types of waves, including sound and light.
The image is meant to show that if the wave source is moving toward us, the waves will be compressed ahead of the source, and a high frequency is heard. Behind the source, the observed pitch is lower than that of a stationary source. The faster the source moves, the greater the change in pitch that is observed.
With light, the effect is not in pitch, but colour. If a source of light moves toward an observer, the waves will be shorter in wavelength and higher in frequency. The light will appear to be shifted toward the blue end of the spectrum. If the source is moving awat from the observer, the shift in frequency causes the colour to appear more red. As in the case of sound, the faster the source moves, the greater the change in colour that is observed. This is the red shift that is seen in all galaxies.
So, to finally answer your question, when we measure the light from more distant galaxies, we routinely note larger shifts in the colour of the light they emit. This tells us they are moving at greater speed than the galaxies that are "close by".