\(B=cos^2x.cot^2x+cos^2x-cot^2x+2\left(sin^2x+cos^2x\right)\)
\(=cos^2x\left(cot^2x+1\right)-cot^2x+2\)
\(=\frac{cos^2x}{sin^2x}-cot^2x+1=cot^2x-cot^2x+1=1\)
\(M=cos^4x-sin^4x+cos^4x+sin^2x.cos^2x+3sin^2x\)
\(=\left(cos^2x-sin^2x\right)\left(cos^2x+sin^2x\right)+cos^2x\left(cos^2x+sin^2x\right)+3sin^2x\)
\(=cos^2x-sin^2x+cos^2x+3sin^2x\)
\(=2\left(sin^2x+cos^2x\right)=2\)