If the source moves towards us, the frequency is higher and wavelength longer, moving away the opposite. Redshift occurs when the source is moving away from us, since the wavelength of the light emitted appears longer to us, shifting towards the red end of the visible spectrum. Hd, where v is the speed, H is the Hubble parameter, and d is the distance. It describes Hubble's observation, that most lines in the spectra of other galaxies were redshifted, and the amount of shift was approximately proportional to the distance of the galaxy from us. So the velocity is proportional to the distance.
H is approx.
It does not work well for nearby galaxies. The fact that with increasing distance the velocity increases, suggests that there was a huge explosion 'some' years ago that accelerated the particles and that the universe is expanding. The U.S. physicists A. Penzias and R. Wilson detected in 1956 microwave radiation coming equally from all directions in the sky, day and night. This radiation is like the one radiated by a black body at a temperature of 3 Kelvin, thereof the name 3K radiation. This discovery supports the theory of Big Bang, where strong shortwave radiation was supposed to be sent out.