\(cot^2x-cos^2x=\frac{cos^2x}{sin^2x}-cos^2x=cos^2x\left(\frac{1}{sin^2x}-1\right)=\frac{cos^2x\left(1-sin^2x\right)}{sin^2x}\)
\(=cos^2x.\left(\frac{cos^2x}{sin^2x}\right)=cot^2x.cos^2x\)
\(\frac{cosx+sinx}{cosx-sinx}-\frac{cosx-sinx}{cosx+sinx}=\frac{\left(cosx+sinx\right)^2-\left(cosx-sinx\right)^2}{\left(cosx-sinx\right)\left(cosx+sinx\right)}\)
\(=\frac{cos^2x+sin^2x+2sinx.cosx-\left(cos^2x+sin^2x-2sinx.cosx\right)}{cos^2x-sin^2x}=\frac{4sinx.cosx}{cos2x}=\frac{2sin2x}{cos2x}=2tan2x\)
\(\frac{sin4x+cos2x}{1-cos4x+sin2x}=\frac{2sin2x.cos2x+cos2x}{1-\left(1-2sin^22x\right)+sin2x}=\frac{cos2x\left(2sin2x+1\right)}{sin2x\left(2sin2x+1\right)}=\frac{cos2x}{sin2x}=cot2x\)
\(A=sin^2x\left(sinx+cosx\right)+cos^2x\left(sinx+cosx\right)\)
\(=\left(sin^2x+cos^2x\right)\left(sinx+cosx\right)=sinx+cosx\)
\(B=\frac{sinx}{cosx}\left(\frac{1+cos^2x-sin^2x}{sinx}\right)=\frac{sinx}{cosx}\left(\frac{2cos^2x}{sinx}\right)=2cosx\)