$\cos \phi \cos\theta + \sin \phi \sin \theta = \frac{c}{\sqrt{a^2+b^2}}$
$ \cos (\theta- \phi) = \frac{c}{\sqrt{a^2+b^2}} = \cos y$
$\Biggl \vert \frac{c}{\sqrt{a^2+b^2}} \Biggl \vert \leq 1 $
We know that for any $n \in \Z$
$\cos (2n\pi+y) = \cos (2n\pi-y) = cos y$
$\Rightarrow \theta - \phi = 2n \pi \pm y$ for all $n \in \Z $
$ \theta \in \{\phi + 2n \pi \pm y \vert \ n \in \Z\} $