As you know, there are some equation in physics to describe the motion of the bodies under a constant acceleration, they are called "The Equations of motion".
one of there equation has got a relation between the final velocity, initial velocity, acceleration and the distance.
in symbols:

where:
is the final velocity,
is the initial velocity,
is the acceleration and
is the distance
thus

