As mentioned in the comments by @Blue the problem can be reduced into $$ a \sin \theta + b \cos \theta +c = 0 $$
to be solved for $\theta$.
The way I have dealt with this equation in the past was to split the angle into two angles $\theta = \varphi + \psi$, and expand
$$\sin \theta = \sin(\varphi+\psi) = \cos\varphi \sin\psi + \sin\varphi \cos\psi$$
$$\cos \theta = \cos(\varphi+\psi) = \cos\varphi \cos \psi - \sin\varphi \sin\psi$$
Then my equation to be solved is
$$ \Bigl( \cos\varphi ( b \cos\psi + a \sin \psi) \Bigr) + \Bigl( \sin\varphi (a \cos\psi - b \sin\psi)+c \Bigr) =0 $$
and you can set each part equal to zero individually
$$\begin{aligned}
\cos\varphi ( b \cos\psi + a \sin \psi) & = 0 \\
\sin\varphi (a \cos\psi - b \sin\psi)+c & = 0
\end{aligned} $$
The first one is solved by $\boxed{\psi = -\tan^{-1} \left( \frac{b}{a} \right) + k \pi }$ which transforms the second one into
$$ \sin\varphi \sqrt{a^2+b^2}+c = 0 $$
with solution $\boxed{ \varphi = \sin^{-1}\left( \frac{c}{\sqrt{a^2+b^2}} \right) +2 k \pi}$
So all together you have
$$ \boxed{ \color{blue}{ \theta = \sin^{-1}\left( \frac{c}{\sqrt{a^2+b^2}} \right)-\tan^{-1} \left( \frac{b}{a} \right) +2 k \pi} } $$