A particle $P$ of mass $m$ is placed on a fixed smooth plane which is inclined at an angle $\theta$ to the horizontal. A light spring, of natural length $a$ and modulus of elasticity $3mg$, has one end attached to $P$ and the other end attached to a fixed point $O$ at the top of the plane. The spring lies along a line of greatest slope of the plane. The system is released from rest with the spring at its natural length.
Find, in terms of $a$ and $\theta$, an expression for the greatest extension of the spring in the subsequent motion. [3]