The Attempt at a Solution
I don't know how to start to solve the problem, because I don't really know which part should I refer to.
First I use the energy.
So the energy stored in the spring will converted to the rotational kinetic energy for the rod.
But I fail to find the x (distance of the spring compressed) Thanks