Concept:
Use integration by parts repeatedly.
\[
\int u\,dv=uv-\int v\,du.
\]
Step 1: Apply integration by parts.
Let
\[
u=(\log x)^2,
\qquad
dv=x^2\,dx.
\]
Then
\[
du=\frac{2\log x}{x}\,dx,
\qquad
v=\frac{x^3}{3}.
\]
Therefore,
\[
I=\int x^2(\log x)^2\,dx
=
\frac{x^3}{3}(\log x)^2
-\frac23\int x^2\log x\,dx.
\]
Step 2: Evaluate \(\int x^2\log x\,dx\).
Let
\[
u=\log x,
\qquad
dv=x^2\,dx.
\]
Then
\[
du=\frac1x\,dx,
\qquad
v=\frac{x^3}{3}.
\]
Hence,
\[
\int x^2\log x\,dx
=
\frac{x^3}{3}\log x
-\frac13\int x^2\,dx.
\]
\[
=
\frac{x^3}{3}\log x
-\frac{x^3}{9}.
\]
Step 3: Substitute back into \(I\).
\[
I
=
\frac{x^3}{3}(\log x)^2
-\frac23
\left(
\frac{x^3}{3}\log x
-\frac{x^3}{9}
\right).
\]
\[
=
\frac{x^3}{3}(\log x)^2
-\frac{2x^3}{9}\log x
+\frac{2x^3}{27}.
\]
Taking \(\dfrac{x^3}{27}\) common,
\[
I
=
\frac{x^3}{27}
\Big[
9(\log x)^2
-6\log x
+2
\Big]
+C.
\]
Therefore,
\[
\boxed{
\int x^2(\log x)^2\,dx
=
\frac1{27}x^3
\left[
9(\log x)^2
-6\log x
+2
\right]
+C
}
\]
\[
\boxed{\text{Answer = (B)}}
\]