Given $I=\int \frac{dx}{\sin^2x\cos^2x}dx$.
We know $\sin^2x+\cos^2x=1.$
Hence we can write I as,
$I=\int \frac{\sin^2x+\cos^2x}{\sin^2x\cos^2x}dx.$
Now separating the terms we get,
$I=\int \big(\frac{1}{\cos^2x}+\frac{1}{\sin^2x}\big)dx$.
But $\frac{1}{\cos^2x}=\sec^2x$ and $\frac{1}{\sin^2x}=cosec^2x.$
$\;\;=\int\sec^2xdx+\int cosec^2xdx.$
On integrating we get,
$\tan x-cot x+c.$
Hence the correct answer is B.