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