$\sec(x) = \frac{1}{\cos(x)}$
\(\begin{align*} \tan^2(x) &= \left(\frac{\sin x}{\cos x} \right)^2 \\ &= \frac{\sin^2 x}{\cos^2 x} \\ &= \frac{\sin^2 x}{\cos^2 x} + \frac{\cos^2 x}{\cos^2 x} - 1\\ &= \frac{\sin^2 x + \cos^2 x}{\cos^2 x} - 1\\ &= \frac{1}{\cos^2 x} - 1 \end{align*}\)
$\frac{5}{\cos(x)} = \frac{3}{\cos^2 x} - 2$
$5 \cos(x) = 3 - 2 \cos^2 x$
$2 \cos^2 x + 5 \cos x - 3 = 0$
$(\cos x + 3) (2 \cos x - 1) = 0$
$\cos x = -3$
$\cos x = \frac{1}{2}$
I think you can take it from here.