A 4kg box is compress 50 cm on a spring (k=100 N/m) and then slides across a horizontal floor. If (u=0.4) between the box and the floor

1) How much work is done by friction as the box comes to a stop?
2) Assuming the frictional force is constant, how far will the box slide before it comes to a stop?

1 answer

1) The work done by friction will equal the initial potential energy of compression in the spring, but will be of the opposite sign. Work is done against friction, not by it.

2)
(1/2)kd^2 = M*g*u*X

d is the initial spring compression.
g is the acceleration of gravity
M is the box's mass
k is the spring constant
u is the kinetic coefficient of friction

Solve for X, the distance that the box slides.