Here's another substitution you could make, inspired by stereographic projection, and it always works when you have a rational function of trigonometric functions of x.
Let [tex]u = \tan(x/2)[/tex]. From that, using various trigonometric identities, obtain the following:
[tex]\sin x = \frac{2u}{1+u^2}; \cos x = \frac{1-u^2}{1+u^2}; dx = \frac{2 \,du}{1+u^2}[/tex]
and in particular
[tex]\tan x = \frac{2u}{1-u^2}; \sec x = \frac{1+u^2}{1-u^2}.[/tex]
Then your integral becomes
[tex]\int \tan^2 x \sec x \,dx = \int \frac{8u^2}{(1-u^2)^3} \,du[/tex]
which can be done by partial fractions. Admittedly, you've ended up with a higher degree denominator than what HallsofIvy gets, but again it always reduces a rational function of trig functions to a rational function of u, which can be done by partial fractions (or if you're lucky, substitution).