Obtain a spectrum of the light emitted from the star. If you look closely at the spectrum you will see dark lines interspersed along the length of the spectrum. These lines, known as "spectral lines," or "emission" or "absorption" lines, are due to rapid changes in energy as the wavelength passes through certain gases, such as hydrogen or helium.
Compare the star's spectrum to a Balmer Series spectrum. The Balmer Series spectrum shows a light spectrum from light passing through hydrogen gas in a laboratory on Earth. The spectral lines on the Balmer Series spectrum indicate where the spectral lines would be for any light at the point from which it was emitted (i.e. at the star).
Find the difference between the spectral lines in the star's spectrum compared to the Balmer Series spectrum. Choose a prominent spectral line, note its value in angstroms on each spectrum, and subtract to find the difference. The observed value is the value of the spectral line found on the star's spectrum. The emitted value is the value found for the corresponding line on the Balmer Series spectrum. Use this equation: observed - emitted = shift. A positive shift indicates a redshift, where the object is moving away from the Earth. A negative shift indicates a blueshift, where the object is moving closer to the Earth. The shift should be roughly the same for any spectral line you choose to compare.
Start with the equation: shift / emitted = velocity / (speed of light). The velocity is the star's known speed that you have been provided with or found. The speed of light is a constant (299,792,458 m/s).
Find a prominent spectral line on a Balmer Series spectrum, and use its value as the emitted wavelength value. It does not matter which line, the shift should be roughly the same for any spectral line.
Solve the equation for the shift. A positive shift indicates a redshift, where the object is moving away from Earth. A negative shift indicates a blueshift, where the object is moving closer to Earth.