\(P=\sqrt{sin^4x\left(1+\dfrac{6cot^2x}{sin^2x}+3cot^4x\right)}+\sqrt{cos^4x\left(1+\dfrac{6tan^2x}{cos^2x}+3tan^4x\right)}\)
\(=sin^2x\sqrt{1+6cot^2x\left(1+cot^2x\right)+3cot^4x}+cos^2x\sqrt{1+6tan^2x\left(1+tan^2x\right)+3tan^4x}\)
\(=sin^2x\sqrt{1+6cot^2x+9cot^4x}+cos^2x\sqrt{1+6tan^2x+9tan^4x}\)
\(=sin^2x\sqrt{\left(3cot^2x+1\right)^2}+cos^2x\sqrt{\left(3tan^2x+1\right)^2}\)
\(=sin^2x\left(3cot^2x+1\right)+cos^2x\left(3tan^2x+1\right)\)
\(=3sin^2x.cot^2x+sin^2x+3cos^2x.tan^2x+cos^2x\)
\(=3sin^2\left(\dfrac{1}{sin^2x}-1\right)+3cos^2x\left(\dfrac{1}{cos^2x}-1\right)+1\)
\(=3-3sin^2x+3-3cos^2x+1\)
\(=7-3\left(sin^2x+cos^2x\right)\)
\(=7-3=4\)