Block on spring problem

Question

Hints

Answer