5. If on the interval $[1,2]$, the function $f(x)=x^{2}+p x+q$ and $g(x)=x+\frac{1}{x^{2}}$ take the same minimum value at the same point, then the maximum value of $f(x)$ on this interval is ( ).
(A) $4+\frac{11}{2} \sqrt[3]{2}+\sqrt[3]{4}$
(B) $4-\frac{5}{2} \sqrt[3]{2}+\sqrt[3]{4}$
(C) $1-\frac{1}{2} \sqrt[3]{2}+\sqrt[3]{4}$
(D) None of the above answers is correct
5. (B).

On $(1,2)$,
$$
\begin{array}{l}
g(x)=x+\frac{1}{x^{2}}=\frac{x}{2}+\frac{x}{2}+\frac{1}{x^{2}} \\
\geqslant 3 \sqrt[3]{\frac{1}{4}}=\frac{3}{2} \sqrt[3]{2} .
\end{array}
$$
Since $f(x)$ and $g(x)$ take the same minimum value at the same point,
$$
\therefore-\frac{p}{2}=\sqrt[3]{2}, \frac{4 q-p^{2}}{4}=\frac{3}{2} \sqrt[3]{2} \text {. }
$$

When $\frac{x}{2}=\frac{1}{x_{2}}$, i.e., $x=\sqrt[3]{2} \in[1,2]$,
$$
g(x)=\frac{3}{2} \sqrt[3]{2} \text {. }
$$

Solving gives $p=-2 \sqrt[3]{2}, q=\frac{3}{2} \sqrt[3]{2}+\sqrt[3]{4}$.
Thus, $f(x)=x^{2}-2 \sqrt[3]{2} x+\frac{3}{2} \sqrt[3]{2}+\sqrt[3]{4}$. Since $\sqrt[3]{2}-1<2-\sqrt[3]{2}$,
$$
\therefore f(x)_{\text {min }}=f(2)=4-\frac{5}{2} \sqrt[3]{2}+\sqrt[3]{4} \text {. }
$$