$\displaystyle \frac{(tan \theta + sec \theta -1 )}{(tan \theta - sec \theta +1 )}= tan \theta + sec \theta$
The identity can be rewritten as:
$\displaystyle tan \theta+sec \theta - 1=(tan \theta-sec \theta+1)(tan\theta+sec\theta)$
$\displaystyle tan \theta+sec \theta - 1=tan ^2\theta -sec \theta tan \theta + tan \theta + sec \theta tan\theta - sec^2\theta+sec \theta$
$\displaystyle tan \theta+sec \theta - 1=tan^2\theta +tan\theta - sec^2\theta+sec \theta$
$\displaystyle tan \theta+sec \theta -1=-1+tan\theta+sec\theta$
which is always true.
We can write it as,
$\displaystyle \frac{\tan\theta+\sec\theta-1}{\tan\theta-\sec\theta+1}$
$\displaystyle = \frac{\tan\theta+\sec\theta+\tan^2\theta-\sec^2\theta}{\tan\theta-\sec\theta+1}$
$\displaystyle = \frac{(\tan\theta+\sec\theta)(\tan\theta-\sec\theta+1)}{\tan\theta-\sec\theta+1}$
$\displaystyle = \tan\theta+\sec\theta$