ĐKXĐ: \(x\ne2\)
\(P=\frac{x-2}{\left(x-2\right)\left(x^2+x+1\right)}=\frac{1}{x^2+x+1}=\frac{1}{\left(x+\frac{1}{2}\right)^2+\frac{3}{4}}\le\frac{1}{\frac{3}{4}}=\frac{4}{3}\)
\(\Rightarrow P_{max}=\frac{4}{3}\) khi \(x+\frac{1}{2}=0\Leftrightarrow x=-\frac{1}{2}\)