The magnitude of the restoring force acting on the object is,
where k is the spring constant, and x is the distance of the spring stretched.
The magnitude of the force acting on the object in terms of the acceleration is,
where m is the mass of the object and a is the acceleration.
From both the values of the force,
Substitutitng the known values,
Thus, the value of the stretched distance of the string is 0.871 m.