Since [tex]\sin^2x+\cos^2x=1[/tex] for all [tex]x[/tex], you can write as a first step
[tex]\dfrac{\cos^2\theta\tan^2\theta}{1-\sin^2\theta}=\dfrac{\cos^2\theta\tan^2\theta}{\cos^2\theta}[/tex]
Then for [tex]\cos\theta\neq0[/tex], you can eliminate both factors of [tex]\cos^2\theta[/tex] in the numerator and denominator to end up with [tex]\tan^2\theta[/tex].