Two positions of the particle are shown. For convenience, the datum, which is horizontally fixed, passes through position 1.
When the particle is in position 1
$\hspace{0.5cm}$ Potential energy of particle $V_1=0$,
And
$\hspace{0.5cm}$ Kinetic energy of particle $T_1=0.$
When the particle is in position 2
$\hspace{0.5cm}$ potential energy of particle $V_2=-mg(r-r \cos \theta)$
and
$\hspace{0.5cm}$ Kinetic energy of particle $T_2=\bigg(\dfrac12\bigg)mv^2,$
When $v$ is the velocity of particle at angle $\theta$
Applying the principle of conversion of energy,
$$T_1+V_1=T_2+V_2$$
$0+0=\dfrac12mv^2-mg(r-r \cos \theta)$
$\hspace{0.5cm} V^2=2gr (1-\cos \theta)$
$\boxed{v=\sqrt{2gr(1-\cos\theta)}}$
Fig shows the FBD of the particle. Resolving forces along the normal to the surface
$\sum F_n=0\rightarrow R+\dfrac{mv^2}{r}-mg \cos\theta=0 \\
R=mg \cos \theta -\dfrac{mv^2}{r}$
Particle leaves the surfaces if R=0, therefore
$0=mg \cos \theta- \dfrac{mv^2}{r} \\
v^2=gr \cos \theta$
From Equations (i) & (ii) , we have
$\hspace{11cm}2gr(1- \cos \theta)=gr \cos \theta$
OR $\hspace{10.5cm}2g-2g \cos \theta=g \cos \theta$
OR $\hspace{12cm}$ $\theta=\cos^{-1}\dfrac23 $
$\hspace{13cm}$ $\boxed{\theta=48.18^0}$