We can avoid calculating distributions altogether.
In the following I will use "$\sim$" to mean "has the same distribution as" while retaining "$=$" to mean strict equality of random variables, as usual.
The cosine is a periodic function with period $2\pi.$ A periodic function $f$ with period $\tau$ simply is one that satisfies $f(x+\tau)=f(x)$ for all $x.$ Equivalently, $f$ is a function of the numbers modulo $\tau$, meaning that before applying $f$ to any number $x,$ $x$ is replaced by its remainder after division by $\tau.$
Periodic functions of a uniform random variable $\Theta$ supported on $[0,\tau)$ generally enjoy some useful properties we might exploit to simplify our work. These include
$f(\Theta+\omega) \sim f(\Theta)$ for fixed $\omega.$
$f(-\Theta) \sim f(\Theta).$
When $\Theta_1$ and $\Theta_2$ are independent uniform random variables, $(1)$ implies $f(\Theta_1+\Theta_2) \sim f(\Theta_1)$ and then $(2)$ implies $f(\Theta_1-\Theta_2)\sim f(\Theta_1).$
Moreover, $\Theta_1\pm\Theta_2$ are independent when computed modulo $\tau$ and therefore the $f(\Theta_1\pm \Theta_2)$ are independent mod $\tau,$ too.
I leave the (easy) demonstrations to you, since this is a self-study problem.
Specializing to $\tau=2\pi$ and $f=\cos,$ use these facts and the rules of trigonometry to justify the following reasoning:
XY &= \cos(\Theta_1)\cos(\Theta_2) \\