\(A=\dfrac{cos^2x-sin^2x}{cosx-sinx}-\dfrac{2cos^2x+2sinx.cosx-2\sqrt{2}\left(sin\left(\dfrac{\pi}{4}\right)cosx+cos\left(\dfrac{\pi}{4}\right)sinx\right)}{2\left(cosx-1\right)}\)
\(=\dfrac{\left(cosx-sinx\right)\left(cosx+sinx\right)}{cosx-sinx}-\dfrac{2cosx\left(sinx+cosx\right)-2\left(sinx+cosx\right)}{2\left(cosx-1\right)}\)
\(=sinx+cosx-\dfrac{2\left(sinx+cosx\right)\left(cosx-1\right)}{2\left(cosx-1\right)}\)
\(=sinx+cosx-\left(sinx+cosx\right)=0\)