Step 1: Letting \( I \) be the given integral
\[
I = \int \left[ (\log_2 x)^2 + 2 \log_2 x \right] dx.
\]
Using the change of base formula for logarithms:
\[
\log_2 x = \frac{\ln x}{\ln 2}.
\]
Rewriting the integral:
\[
I = \int \left[ \left( \frac{\ln x}{\ln 2} \right)^2 + 2 \frac{\ln x}{\ln 2} \right] dx.
\]
Step 2: Substituting \( u = \log_2 x \)
Let:
\[
u = \log_2 x = \frac{\ln x}{\ln 2}, \quad \text{so that} \quad du = \frac{dx}{x \ln 2}.
\]
Rewriting the integral:
\[
I = \int (u^2 + 2u) dx.
\]
Since \( du = \frac{dx}{x \ln 2} \), we multiply by \( x \) and integrate:
\[
I = \int (u^2 + 2u) x dx.
\]
Using the integral formula:
\[
\int u^n dx = \frac{x u^{n+1}}{n+1}.
\]
Applying this:
\[
I = x \left( \frac{(\log_2 x)^3}{3} + (\log_2 x)^2 \right) + c.
\]
Step 3: Conclusion
Thus, the final answer simplifies to:
\[
\boxed{x (\log_2 x)^2 + c}.
\]