a: \(=\dfrac{2x\left(x+1\right)\left(x-2\right)^2}{x\left(x-2\right)\left(x+2\right)\left(x+1\right)}=\dfrac{2\left(x-2\right)}{x+2}=\dfrac{2\left(\dfrac{1}{2}-2\right)}{\dfrac{1}{2}+2}=2\cdot\dfrac{-3}{2}:\dfrac{5}{2}=-3\cdot\dfrac{2}{5}=-\dfrac{6}{5}\)
b: \(=\dfrac{x\left(x^2-xy+y^2\right)}{\left(x+y\right)\left(x^2-xy+y^2\right)}=\dfrac{x}{x+y}=\dfrac{-5}{-5+10}=\dfrac{-5}{5}=-1\)