Consider the points on the circle in polar coordinates: all points on the circle are a fixed distance away from the center, and their coordinates are determined entirely by an angle [tex]\theta\in[0,2\pi)[/tex] made relative to the positive [tex]x[/tex]-axis.
Any point B on the circle has [tex]x[/tex]-coordinate [tex]x(\theta)=1+\cos\theta[/tex]. Let [tex]\Theta[/tex] be a random variable uniformly distributed on the interval [tex][0,2\pi)[/tex]. Then
[tex]P(\Theta=\theta)=\begin{cases}\frac1{2\pi}&\text{for }\theta\in[0,2\pi)\\0&\text{otherwise}\end{cases}[/tex]
[tex]\implies P(\Theta\le\theta)=\begin{cases}0&\text{for }\theta<0\\\frac{\theta}{2\pi}&\text{for }0\le\theta<2\pi\\1&\text{for }\theta\ge2\pi\end{cases}[/tex]
Now,
[tex]P(X\le x)=P(1+\cos\Theta\le x)=P(\Theta\le\cos^{-1}(x-1))[/tex]
so that the density of [tex]X[/tex] is
[tex]P(X=x)=\dfrac{\mathrm d}{\mathrm dx}P(\Theta\le\cos^{-1}(x-1))[/tex]
[tex]\implies P(X=x)=\begin{cases}\frac1{\pi\sqrt{2x-x^2}}&\text{for }0\le x\le2\\0&\text{otherwise}\end{cases}[/tex]