a: \(P=\left(\dfrac{x}{x+2}-\dfrac{\left(x-2\right)\left(x^2+2x+4\right)\cdot\left(x^2-2x+4\right)}{\left(x+2\right)\left(x^2-2x+4\right)\cdot\left(x-2\right)\left(x+2\right)}\right):\left(\dfrac{1}{x+2}\cdot\dfrac{x^3-x-2x+2}{x^2+x+1}\right)\)
\(=\left(\dfrac{x}{x+2}-\dfrac{x^2-2x+4}{\left(x+2\right)^2}\right):\left(\dfrac{1}{x+2}\cdot\dfrac{x\left(x-1\right)\left(x+1\right)-2\left(x-1\right)}{x^2+x+1}\right)\)
\(=\dfrac{x^2+2x-x^2+2x-4}{\left(x+2\right)^2}:\left(\dfrac{1}{x+2}\cdot\dfrac{\left(x-1\right)\left(x^2+x-2\right)}{x^2+x+1}\right)\)
\(=\dfrac{4x-4}{\left(x+2\right)^2}:\left(\dfrac{1}{x+2}\cdot\dfrac{\left(x-1\right)\left(x+2\right)\left(x-1\right)}{x^2+x+1}\right)\)
\(=\dfrac{4\left(x-1\right)}{\left(x+2\right)^2}\cdot\dfrac{x^2+x+1}{\left(x-1\right)^2}=\dfrac{4\left(x^2+x+1\right)}{\left(x+2\right)^2\left(x-1\right)}\)
b: Để P>0 thì x-1>0
hay x>1