Newton's second law states that the product between the mass and the acceleration of an object is equal to the force applied:

from which we find an expression for the acceleration:

(1)
Both objects are moving by uniformly accelerated motion (because the force applied is constant), so we can also using the following relationship

(2)
where

is the final speed of the object

is the initial speed
S is the distance covered
By substituting (1) into (2), and by removing

(since the final velocity of the two objects is zero), we find


where we can ignore the negative sign (because the force F will bring another negative sign).
For the first object, we have
![S= \frac{(2.0 m/s)^2 (4.0 kg)}{2F} = \frac{8}{F} [m]](https://tex.z-dn.net/?f=S%3D%20%5Cfrac%7B%282.0%20m%2Fs%29%5E2%20%284.0%20kg%29%7D%7B2F%7D%20%3D%20%20%5Cfrac%7B8%7D%7BF%7D%20%5Bm%5D%20)
And for the second object we have
![S= \frac{(4.0 m/s)^2 (1.0 kg)}{2F} = \frac{8}{F} [m]](https://tex.z-dn.net/?f=S%3D%20%5Cfrac%7B%284.0%20m%2Fs%29%5E2%20%281.0%20kg%29%7D%7B2F%7D%20%3D%20%5Cfrac%7B8%7D%7BF%7D%20%5Bm%5D%20)
And since the braking force applied to the two objects is the same, the two objects cover the same distance.