Problem 3/155 The light rod is pivoted at O and carries the 2kg and 4kg particles. If the rod is released from rest at $\theta=60°$ and swings in the vertical plane, calculate (a) the velocity $v$ of the 2-kg particle just before it hits the spring in the dashed position and (b) the maximum compression $x$ of the spring. Assume that $x$ is small so that the position of the rod when the spring is compressed is essentially horizontal.
The part I am most confused about it part a) as I am not sure how to come up with the energy equation using angular motion instead of linear motion. Trying to solve the question I assumed I had to use $\frac12I\omega^2$ instead of $\frac12mv^2$.The height for GPE of mass a and mass b I am also unsure how to calculate.
In addition to part a, I assumed the energy equation: $GPE_a=KE_b-GPE_b$ where GPE is gravitational potential energy and KE is kinetic energy. The kinetic energy of A = 0 since it is initially at rest, and GPE of mass b is negative due to loss of GPE where I took the vertical plane as the datum.
I may have the wrong assumptions and I am open to other answers people may have.