<s>[INST] Prove the following trigonometric identity. $$\frac{\sin x - \cos x +1}{\sin x + \cos x -1}=\frac{\sin x +1}{\cos x}$$  
I tried substituting $\sin^2x+\cos^2x = 1$ but I cannot solve it.
 [/INST] Observe that the Right Hand side $\displaystyle\frac{\sin x+1}{\cos x}=\tan x+\sec x$
So, I want to utilize $\displaystyle\sec^2x-\tan^2x=1$
Dividing  the numerator & the denominator by $\cos x,$
$$\frac{\sin x - \cos x +1}{\sin x + \cos x -1}=\frac{\tan x-1+\sec x}{\tan x+1-\sec x}$$
$$=\frac{\tan x+\sec x-(\sec^2x-\tan^2x)}{\tan x+1-\sec x}(\text{ Replacing }1\text{ with } \sec^2x-\tan^2x)$$
$$=\frac{(\sec x+\tan x)-(\sec x+\tan x)(\sec x-\tan x)}{\tan x+1-\sec x}$$
$$=\frac{(\sec x+\tan x)(1-\sec x+\tan x)}{\tan x+1-\sec x}$$
$$=\sec x+\tan x$$
</s>