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