5. Let $\frac{x}{x^{2}-p x+1}=1$. Then the value of $\frac{x^{3}}{x^{6}-p^{3} x^{3}+1}$ is ( )
(A) 1
(B) $\frac{1}{3 p^{2}-2}$
(C) $\frac{1}{p^{3}+3^{2}}$
(D) $\frac{1}{3 p^{2}+1}$
5. B

From the given, we have $\frac{x^{2}-p x+1}{x}=1$,
which means
$$
\begin{array}{l}
x+\frac{1}{x}=1+p \text {. } \\
\therefore x^{3}+\frac{1}{x^{3}}=\left(x+\frac{1}{x}\right)\left(x^{2}-1+\frac{1}{x^{2}}\right) \\
=(p+1)\left[(p+1)^{2}-3\right] \\
=p^{3}+3 p^{2}-2 \text {. } \\
\text { And } \frac{x^{6}-p^{3} x^{3}+1}{x^{3}}=x^{3}+\frac{1}{x^{3}}-p^{3} \\
=3 p^{2}-2 \text {. } \\
\end{array}
$$