<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] I will start like Timotej, but finish differently.
$$\cos x(\sin x-\cos x+1)=\cos x(1+\sin x)-\cos^2x=\cos x(1+\sin x)-(1-\sin^2x)$$
$$=(1+\sin x)\{\cos x-(1-\sin x)\}$$
$$\implies \cos x(\sin x-\cos x+1)=(1+\sin x)(\sin x+\cos x-1)$$
Now change the sides of $\displaystyle \cos x, \sin x+\cos x-1$

Let me derive some  other identities
$(1)\displaystyle\sin x(\sin x-\cos x+1)=\sin^2x+\sin x(1-\cos x)=1-\cos^2x+\sin x(1-\cos x)$
$\displaystyle\implies\sin x(\sin x-\cos x+1)=(1-\cos x)(\sin x+\cos x+1)$
$(2)\displaystyle\sin x(\sin x+\cos x-1)=\sin^2x-\sin x(1-\cos x)=(1-\cos x)(1+\cos x-\sin x)$
$(3)\displaystyle\cos x(\sin x+\cos x-1)=\cos^2x-\cos x(1-\sin x)=(1-\sin x)(1+\sin x-\cos x)$
and so on
</s>