
A particle $P$ of mass $m$ is attached to one end of a light inextensible string of length $a$. The other end of the string is attached to a fixed point $O$. The particle $P$ is held with the string taut and the string makes an angle $\theta$ with the downward vertical through $O$. The particle $P$ is projected at right angles to the string with speed $\frac13\sqrt{10ag}$ and begins to move downwards along a circular path. When the string is vertical, it strikes a small smooth peg at the point $A$, which is vertically below $O$. The circular path and the point $A$ are in the same vertical plane. After the string strikes the peg, the particle $P$ begins to move in a vertical circle with centre $A$. When the string makes an angle $\theta$ with the upward vertical through $A$, the string becomes slack (see diagram). The distance of $A$ below $O$ is $\frac59a$.
(a) Find the value of $\cos\theta$. [6]
(b) Find the ratio of the tensions in the string immediately before and immediately after it strikes the peg. [4]