I am going to abuse the equality sign a little, and manipulate both sides at once.
I find that a bit more intuitive

Required to Prove:

$$\dfrac{\cos(x)}{1-\sin(x)}-\tan(x)=\sec(x)$$

Move to "usual" trig functions

$$\dfrac{\cos(x)}{1-\sin(x)}-\dfrac{\sin(x)}{\cos(x)}=\dfrac{1}{\cos(x)}$$

There are $\cos$'s on the bottom line, so lets simplify by multiplying both sides by $\cos(x)$

$$\dfrac{\cos^{2}(x)}{1-\sin(x)}-\sin(x)=1$$

Move the lonely $\sin(x)$

$$\dfrac{\cos^{2}(x)}{1-\sin(x)}=1+\sin(x)$$

The denominator on the bottom of left hand side would be good to have $\cos^2(x)=1-\sin^2(x)=(1-\sin(x))(1+\sin(x))$. and we can always multiple any term by $1=\dfrac{1+\sin(x)}{1+\sin(x)}$

$$\dfrac{\cos^{2}(x)}{1-\sin(x)}\dfrac{1+\sin(x)}{1+\sin(x)}=1+\sin(x)$$

$$\dfrac{\cos^{2}(x)(1+\sin(x))}{1-\sin^{2}(x)}=1+\sin(x)$$

$$\dfrac{\cos^{2}(x)(1+\sin(x))}{\cos^{2}(x)}=1+\sin(x)$$

$$1+\sin(x)=1+\sin(x)$$