\(A=\dfrac{x^4-x}{x^2+x+1}-\dfrac{2x^2+x}{x}+\dfrac{2\left(x^2-1\right)}{x-1}\\ A=\dfrac{x\left(x^3-1\right)}{x^2+x+1}-\dfrac{x\left(2x+1\right)}{x}+\dfrac{2\left(x-1\right)\left(x+1\right)}{x-1}\\ A=\dfrac{x\left(x-1\right)\left(x^2+x+1\right)}{x^2+x+1}-\dfrac{x\left(2x+1\right)}{x}+\dfrac{2\left(x-1\right)\left(x+1\right)}{x-1}\\ A=x\left(x-1\right)-\left(2x+1\right)+2\left(x+1\right)\\ A=x^2-x-2x-1+2x+1\\ A=x^2-x\)