Answer: The redshift occurs because the starts are moving away from the earth.
Explanation:
Every object emits wavelength from its body. When it comes to universe there are some visible light emitted by the stars and other objects in galaxy.
If a star is moving towards the sun then it emits a shorter wavelength compared to the source which is at rest. This is blue in color called as blue shift.
But when it comes to stars they move away from the earth and hence emits longer wavelength called as red shift.
As the object it at rest it more towards the blue side and when the objects starts moving it starts moving towards the red side in the visible spectrum.
So, when the starts moves away from the earth it forms a Redshift.
F=kx is the formula for spring force. If Extension versus Force was graphed, a linear relation would appear, where the slope is the k value, aka the spring constant.