Redshift occurs when the light source is moving away from you or when the space between you and the source is stretched. Redshift occurs when the source of light is moving away from the observer. So when astronomers see redshift in the light from a galaxy, they know that the galaxy is moving away from Earth.