ĐKXĐ: \(x\ne1;3\)
\(P=\left(\frac{2x^2+1}{\left(x-1\right)\left(x^2+x+1\right)}-\frac{x^2+x+1}{\left(x-1\right)\left(x^2+x+1\right)}\right):\left(\frac{x^2+x+1-x^2-4}{x^2+x+1}\right)\)
\(P=\left(\frac{x^2-x}{\left(x-1\right)\left(x^2+x+1\right)}\right):\left(\frac{x-3}{x^2+x+1}\right)\)
\(P=\frac{x\left(x-1\right)}{\left(x-1\right)\left(x^2+x+1\right)}.\frac{\left(x^2+x+1\right)}{\left(x-3\right)}=\frac{x}{x-3}\)