Take the object's starting direction of motion to be the positive direction, so that a stopping force acts in the opposite direction. By Newton's second law, the object undergoes an acceleration a such that
-15 N = (20 kg) a
Solve for a :
a = - (15 N) / (20 kg) = -0.75 m/s²
The object's velocity v at time t is then given by
v = 3 m/s + (-0.75 m/s²) t
so the time it takes for the object to slow to a rest is
0 = 3 m/s + (-0.75 m/s²) t
t = (3 m/s) / (0.75 m/s²) = 4.0 s