\(\text{a) }\dfrac{x^2+2}{x^3-1}+\dfrac{x}{x^2+x+1}+\dfrac{1}{1-x}\\ =\dfrac{x^2+2}{\left(x-1\right)\left(x^2+x+1\right)}+\dfrac{x}{x^2+x+1}-\dfrac{1}{x-1}\\ =\dfrac{x^2+2}{\left(x-1\right)\left(x^2+x+1\right)}+\dfrac{x\left(x-1\right)}{\left(x^2+x+1\right)\left(x-1\right)}-\dfrac{\left(x^2+x+1\right)}{\left(x-1\right)\left(x^2+x+1\right)}\\ =\dfrac{x^2+2+x\left(x-1\right)-\left(x^2+x+1\right)}{\left(x^2+x+1\right)\left(x-1\right)}\\ =\dfrac{x^2+2+x^2-x-x^2-x-1}{\left(x^2+x+1\right)\left(x-1\right)}\\ =\dfrac{x^2-2x+1}{\left(x^2+x+1\right)\left(x-1\right)}\\ =\dfrac{\left(x-1\right)^2}{\left(x^2+x+1\right)\left(x-1\right)}\\ =\dfrac{x-1}{x^2+x+1}\\ \)
\(\text{b) }\dfrac{x}{xy-y^2}+\dfrac{2x-y}{xy-x^2}\\ =\dfrac{x}{y\left(x-y\right)}+\dfrac{2x-y}{x\left(y-x\right)}\\ =\dfrac{x}{y\left(x-y\right)}-\dfrac{2x-y}{x\left(x-y\right)}\\ =\dfrac{x^2}{y\left(x-y\right)x}-\dfrac{\left(2x-y\right)y}{x\left(x-y\right)y}\\ =\dfrac{x^2-\left(2x-y\right)y}{xy\left(x-y\right)}\\ =\dfrac{x^2-2xy+y^2}{xy\left(x-y\right)}\\ =\dfrac{\left(x-y\right)^2}{xy\left(x-y\right)}\\ =\dfrac{x-y}{xy}\)