$\sec\theta+\tan\theta=p$ and $\sec\theta\tan\theta=q$. Eliminate $\theta$ to form a equation between $p$ and $q$. $\sec\theta+\tan\theta=p$ and $\sec\theta\tan\theta=q$. Eliminate $\theta$ to form a equation between $p$ and $q$.

$\sec\theta+\tan\theta=p$
$(\sec\theta+\tan\theta)^2=p^2$
$\sec^2\theta+\tan^2\theta+2\tan\theta\sec\theta=p^2$
$\sec^2\theta+\tan^2\theta+2q=p^2$
$1+2\tan^2\theta+2q=p^2$
I am stuck here. Please help me. Thanks.

Now, $\sec^2\theta \tan^2\theta=q^2$. 
So, $(1+\tan^2\theta)\tan^2\theta=q^2$. 
You have got that $1+2\tan^2\theta+2q=p^2$. 
So, $\tan^2\theta=\frac{p^2-1-2q}{2}$. 
Now plug in this $\tan^2\theta$ in the equation got above.
