Notice, we have $$\tan^2\theta-2\sec\theta=2$$ $$\sec^2\theta-1-2\sec\theta=2$$ $$\sec^2\theta-2\sec\theta-3=0$$ $$\sec^2\theta-3\sec\theta+\sec\theta-3=0$$
$$\underbrace{\sec^2\theta-3\sec\theta}\underbrace{+\sec\theta-3}=0$$ $$\sec\theta(\sec \theta-3)+(\sec\theta-3)=0$$ $$(\sec\theta-3)(\sec\theta+1)=0$$ $$\implies \sec\theta-3=0\iff \cos \theta=\frac{1}{3}\iff \color{blue}{\theta=2k\pi\pm\cos^{-1}\left(\frac{1}{3}\right)}$$
$$\implies \sec\theta+1=0\iff \cos \theta=-1\iff \color{blue}{\theta=2k\pi+\pi}$$
Where, $k$ is any integer & $\cos^{-1}\left(\frac{1}{3}\right)=1.231$
Your answers are obtained as follows, $$\color{red}{\theta}=2k\pi+\cos^{-1}\left(\frac{1}{3}\right)=\color{red}{2k\pi+1.231}$$
$$\color{red}{\theta}=2k\pi+2\pi-\cos^{-1}\left(\frac{1}{3}\right)=\color{red}{2k\pi+5.052}\ \ \ \text{(since, }\ \cos\theta=\cos(2\pi-\theta))$$ & $$\color{red}{\theta=2k\pi+\pi}$$