While studying energy on Sears & Zemansky's University Physics, I came up with a doubt on the meaning of kinetic energy. The book gives two possible physical interpretations of this quantity.

I'm okay with the first meaning of KE but I don't understand completely the second one. I don't understand how the particle can do work just because it owns KE.

Consider a ball with velocity ##v## that meets a spring, the spring is compressed and the ball is stopped. Following the previous interpretation of the kinetic energy, the ball should do work on the spring because of its KE. But does this really happen?

In the collision with the spring exerts a force ##f## on the ball and the ball exerts a force ##-f## on the spring. Are the two works done by the two forces equal and opposite?

Hello Soren,
Yes. That is conservation of mechanical energy. Sum of energies before and after is the same, so the changes add up to zero.
If you wait a little longer, the spring is compressed as far as it will go and the ball is at resst (has lost its kinetic energy). Then the spring pushes the ball away -- doing work on the ball that picks up kinetic energy again.

Yes. The work of the spring on the ball is negative and the work of the ball on the spring positive with the same magnitude. This is just conservation of energy.

Thanks a lot for the replies @BvU and @Orodruin ! I hope that what I will ask makes sense: how does the "canceling out" of the works imply the conservation of energy, explicitly?
Firstly, to introduce the elastic potential energy ##U## it is necessary to take as "system" both the spring and the ball. Then is it possible to write the following? ##K_{initial, ball}-W_{spring}+W_{ball}=U_{system}##
Again, I don't know if it makes sense, but I would like to see in what way do the two works cancel out