Need help in proving that $\frac{\sin\theta - \cos\theta + 1}{\sin\theta + \cos\theta - 1} = \frac 1{\sec\theta - \tan\theta}$
$$\frac{\sin\theta-\cos\theta+1}{\sin\theta+\cos\theta-1}$$
$$=\frac{\tan\theta-1+\sec\theta}{\tan\theta+1-\sec\theta}(\text{ dividing the numerator & the denominator by} \cos\theta )$$
$$=\frac{\tan\theta-1+\sec\theta}{\tan\theta-\sec\theta+(\sec^2\theta-\tan^2\theta)} (\text{ putting } 1=\sec^2\theta-\tan^2\theta) $$
$$=\frac{\tan\theta+\sec\theta-1}{\tan\theta-\sec\theta-(\tan\theta-\sec\theta)(\tan\theta+\sec\theta)}$$
$$=\frac{\tan\theta+\sec\theta-1}{-(\tan\theta-\sec\theta)(\tan\theta+\sec\theta-1)}$$
$$=\frac1{\sec\theta-\tan\theta}$$
Alternatively using Double-angle formula by putting $\tan\frac\theta2=t,$
$$\text{ LHS= }\frac{\sin\theta-\cos\theta+1}{\sin\theta+\cos\theta-1}=\frac{\frac{2t}{1+t^2}-\frac{1-t^2}{1+t^2}+1}{\frac{2t}{1+t^2}+\frac{1-t^2}{1+t^2}-1}$$
$$=\frac{2t-(1-t^2)+1+t^2}{2t+(1-t^2)-(1+t^2)} =\frac{2t+2t^2}{2t-2t^2}=\frac{1+t}{1-t}\text{assuming }t\ne0$$
$$\text{ RHS= }\frac1{\sec\theta-\tan\theta}=\frac1{\frac{1+t^2}{1-t^2}-\frac{2t}{1-t^2}}=\frac{1-t^2}{(1-t)^2}=\frac{1+t}{1-t} \text{assuming }t-1\ne0$$
$$\frac{\sin\theta -\cos\theta +1}{\sin\theta +\cos\theta -1}= \frac{1}{\sec\theta - \tan\theta}$$
By taking $$\mbox{L.H.S ( Left hand side )} = \frac{\sin\theta -\cos\theta +1}{\sin\theta +\cos\theta -1} = \frac{2\sin\frac{\theta}{2}\cos\frac{\theta}{2}+2\sin^2\frac{\theta}{2}}{2\sin\frac{\theta}{2}\cos\frac{\theta}{2}-2\sin^2\frac{\theta}{2}}$$ [By applying $1-\cos\theta = 2\sin^2\frac{\theta}{2}$]
Which after simplification gives : $$\frac{\sin\frac{\theta}{2}+ \cos\frac{\theta}{2}}{\cos\frac{\theta}{2}-\sin\frac{\theta}{2}}$$
Now taking R.H.S we get : $$ \begin{align} \frac{1}{\sec\theta - \tan\theta} &= \frac{\cos\theta}{1-\sin\theta}\\ &= \frac{\cos^2\theta - \sin^2\theta}{\cos^2\frac{\theta}{2}+\sin^2\frac{\theta}{2}-2\sin\frac{\theta}{2}\cos\frac{\theta}{2}} \\ &= \frac{(\cos^2\frac{\theta}{2}-\sin^\frac{\theta}{2})}{(\cos\frac{\theta}{2}-\sin\frac{\theta}{2})^2} \\ &= \frac{\sin\frac{\theta}{2}+ \cos\frac{\theta}{2}}{\cos\frac{\theta}{2}-\sin\frac{\theta}{2}}\\ &= \mbox{L.H.S ( Left hand side )}\end{align},$$ where the second equality comes from applying $\cos\theta = \cos^2\frac{\theta}{2}-\sin^2\frac{\theta}{2}$ and $\sin\theta = 2\sin\frac{\theta}{2}\cos\frac{\theta}{2}$.
Let $\displaystyle{\sin\theta=\frac{a}{c}}$ and $\displaystyle{\cos\theta=\frac{b}{c}}$ such that $\displaystyle{a^2 + b^2=c^2}$.
$$\displaystyle{\frac{sin\theta - \cos\theta + 1}{\sin\theta+\cos\theta -1}}$$ $$\displaystyle{=\frac{a-b+c}{a+b-c}}$$
Now $\displaystyle{\tan\theta=\frac{a}{b}}$ and $\displaystyle{\sec\theta=\frac{c}{b}}$. Hence, $$\displaystyle{\frac{1}{\sec\theta-\tan\theta}}$$ $$\displaystyle{=\frac{1}{\frac{c}{b}-\frac{a}{b}}}$$ $$\displaystyle{=\frac{b}{c-a}}$$
Let us assume that $$\displaystyle{=\frac{a-b+c}{a+b-c}\neq\frac{b}{c-a}}$$
This simplifies to $$\displaystyle{a^2 + b^2\neq c^2}$$
This is obviously false. Hence, $$\displaystyle{\frac{a-b+c}{a+b-c}=\frac{b}{c-a}}$$
QED