Final answer:
The work done by the spring on the block depends on the distance the spring is stretched from its equilibrium position. Due to the nature of the spring force acting over a distance, the work can be positive or negative, not only depending on the direction of the motion but also based on the displacement from equilibrium.
Step-by-step explanation:
The work done by a spring on a block depends on the displacement of the spring from its equilibrium position. When the block on a frictionless surface is attached to a horizontal spring, stretched and released, the spring exerts a force that is proportional to the displacement and in the opposite direction, as expressed by Hooke's law (F=-kx).
Considering the spring force's direction relative to the displacement of the block, the work done by the spring can be positive or negative. Negative work is done when the spring force and displacement are in opposite directions (as the spring returns to equilibrium), and positive work is done when they are in the same direction (as the spring moves away from equilibrium). Therefore, the correct answer to the question is that the work done by the spring depends on the distance the spring is stretched from its relaxed position (c).