Proving Trigonometric Equality
From the last line of your working, and using $\sin^2x+\cos^2x=1,$ $$\frac{\cos^2x}{\cos^3x-\cos x\sin^2x}=\frac{\cos x}{\cos^2x-\sin^2x}=\frac{\cos x}{\cos^2x-(1-\cos^2x)}=\frac{\cos x}{2\cos^2x-1}$$
Multiplying numerator/denominator by $\cos x$,
$$\frac{c}{1-t}-\frac{s}{1+t}=c\left(\frac c{c-s}-\frac s{c+s}\right)=c\frac{c^2+cs-cs+s^2}{c^2-s^2}=\frac c{2c^2-1}.$$
$$\frac { cosx }{ 1-tanx } -\frac { sinx }{ 1+tanx } =\frac { cosx }{ 2cos^{ 2 }x-1 } \\ \frac { \cos { x } \left( 1+tanx \right) }{ \left( 1-tanx \right) \left( 1+tanx \right) } -\frac { \sin { x } \left( 1-tanx \right) }{ \left( 1-tanx \right) \left( 1-tanx \right) } =\\ =\frac { \cos { x } +\sin { x } -\sin { x } +\frac { \sin ^{ 2 }{ x } }{ \cos { x } } }{ 1-\tan ^{ 2 }{ x } } =\frac { \frac { \cos ^{ 2 }{ x+\sin ^{ 2 }{ x } } }{ \cos { x } } }{ \frac { \cos ^{ 2 }{ x-\sin ^{ 2 }{ x } } }{ \cos ^{ 2 }{ x } } } =\\ =\frac { \cos { x } }{ \cos ^{ 2 }{ x-\sin ^{ 2 }{ x } } } =\frac { \cos { x } }{ 2\cos ^{ 2 }{ x-1 } } $$