a: \(=\dfrac{5x+30}{x\left(x-3\right)\left(x+2\right)}+\dfrac{4x+12}{x\left(x+2\right)}-\dfrac{x}{x-3}\)
\(=\dfrac{5x+30+4\left(x^2-9\right)-x^2\left(x+2\right)}{x\left(x+2\right)\left(x-3\right)}\)
\(=\dfrac{5x+30+4x^2-36-x^3-2x^2}{x\left(x+2\right)\left(x-3\right)}\)
\(=\dfrac{-x^3+2x^2+5x-6}{x\left(x+2\right)\left(x-3\right)}\)
\(=\dfrac{-x^3-2x^2+4x^2+8x-3x-6}{x\left(x+2\right)\left(x-3\right)}\)
\(=\dfrac{\left(x+2\right)\left(-x^2+4x-3\right)}{x\left(x+2\right)\left(x-3\right)}=\dfrac{-\left(x-1\right)}{x}\)
b: \(=\dfrac{x}{x+1}-\dfrac{1}{\left(x-1\right)\left(x+1\right)}+\dfrac{x^5+x+1}{\left(x+1\right)\left(x^3-1\right)}\)
\(=\dfrac{x^2-x-1}{\left(x+1\right)\left(x-1\right)}+\dfrac{x^3-x^2+1}{\left(x+1\right)\left(x-1\right)}\)
\(=\dfrac{x^2-x-1+x^3-x^2+1}{\left(x+1\right)\left(x-1\right)}=\dfrac{x^3-x}{\left(x+1\right)\left(x-1\right)}=x\)