\(P=\left(\frac{4x^2-3x+17}{x^3-1}+\frac{2x-1}{x^2+x+1}+\frac{6x}{x-x^2}\right):\frac{x+2}{x^3-1}\) \(\left(x\ne1;x\ne0\right)\)
\(=\left(\frac{4x^2-3x+17}{\left(x-1\right)\left(x^2+x+1\right)}+\frac{2x-1}{x^2+x+1}-\frac{6}{x-1}\right).\frac{\left(x-1\right)\left(x^2+x+1\right)}{x+2}\)
\(=\left(\frac{\left(4x^2-3x+17\right)+\left(2x-1\right)\left(x-1\right)-6\left(x^2+x+1\right)}{\left(x-1\right)\left(x^2+x+1\right)}\right).\frac{\left(x-1\right)\left(x^2+x+1\right)}{x+2}\)
\(=\frac{4x^2-3x+17+2x^2-3x+1-6x^2-6x-6}{x+2}\)
\(=\frac{-12x+12}{x+2}\)
\(P=\left(\frac{4x^2-3x+17}{x^3-1}+\frac{2x-1}{x^2+x+1}+\frac{6x}{x-x^2}\right):\frac{x+2}{x^3-1}\)
\(=\left(\frac{4x^2-3x+17}{x^3-1}+\frac{2x-1}{x^2+x+1}+\frac{6x}{x\left(1-x\right)}\right):\frac{x+2}{x^3-1}\)
\(=\left(\frac{4x^2-3x+17}{\left(x-1\right)\left(x^2+x+1\right)}+\frac{2x-1}{x^2+x+1}+\frac{6}{1-x}\right).\frac{x^3-1}{x+2}\)
\(=\left(\frac{4x^2-3x+17}{\left(x-1\right)\left(x^2+x+1\right)}+\frac{\left(2x-1\right)\left(x-1\right)}{\left(x-1\right)\left(x^2+x+1\right)}-\frac{6\left(x^2+x+1\right)}{\left(x-1\right)\left(x^2+x+1\right)}\right).\frac{x^3-1}{x+2}\)
\(=\left(\frac{4x^2-3x+17+2x^2-2x-x+1-6x^2-6x-6}{\left(x-1\right)\left(x^2+x+1\right)}\right).\frac{x^3-1}{x+2}\)
\(=\left(\frac{-12x+12}{\left(x-1\right)\left(x^2+x+1\right)}\right).\frac{x^3-1}{x+2}\)
\(=\left(\frac{12\left(x-1\right)}{\left(x-1\right)\left(x^2+x+1\right)}\right).\frac{x^3-1}{x+2}\)
\(=-\frac{12}{x^2+x+1}.\frac{x^3-1}{x+2}\)
\(=\frac{-12}{x^2+x+1}.\frac{\left(x-1\right)\left(x^2+x+1\right)}{x+2}\)
\(=-12.\frac{x-1}{x+2}\)