The mass is moving by uniformly accelerated motion, with initial velocity

and acceleration

. Its position at time t is given by the following law:

where we take the initial position

since we are only interested in the distance traveled by the mass.
If we put

into the equation, the corresponding time t is the time it takes for the mass to travel this distance:


And the two solutions for the equation are:

--> negative, we can discard it

--> this is the solution to our problem