Answer
$$\frac{1}{2}[\tan x \sec x-\ln |\sec x+\tan x|]+C$$
Work Step by Step
Since
\begin{aligned} \int \tan ^{2} x \sec x d x &=\int\left(\sec ^{2} x-1\right) \sec x d x \\ &=\int \sec ^{3} x-\sec x d x \\ &=\int \sec ^{3} x d x-\int \sec x d x \end{aligned}
Use
$$ \int \sec ^{m} x d x=\frac{\tan x \sec ^{m-2} x}{m-1}+\frac{m-2}{m-1} \int \sec ^{m-2} x d x$$
Then
\begin{aligned} \int \tan ^{2} x \sec x d x &=\int \sec ^{3} x d x-\int \sec x d x \\ &=\frac{\tan x \sec ^{3-2} x}{3-1}+\frac{3-2}{3-1} \int \sec ^{3-2}-\int \sec x d x \\ &=\frac{\tan x \sec x}{2}+\frac{1}{2} \int \sec x d x-\int \sec x d x \\ &=\frac{1}{2} \tan x \sec x+\frac{1}{2} \ln |\sec x+\tan x|+C \\ &\left.=\frac{1}{2} \tan x \sec x-\frac{1}{2} \ln |\sec x+\tan x|\right]+C \\ &=\frac{1}{2}[\tan x \sec x-\ln |\sec x+\tan x|]+C \end{aligned}