Lời giải:
\(B=\frac{2\sin ^2x-1}{(\sin x-\cos x)^2}=\frac{2\sin ^2x-(\sin ^2x+\cos ^2x)}{(\sin x-\cos x)^2}=\frac{\sin ^2x-\cos ^2x}{(\sin x-\cos x)^2}\)
\(=\frac{(\sin x-\cos x)(\sin x+\cos x)}{(\sin x-\cos x)^2}=\frac{\sin x+\cos x}{\sin x-\cos x}\)