\(\dfrac{x^3-3}{x^2-2x-3}\)\(-\dfrac{2\left(x-3\right)}{x+1}\)\(+\dfrac{x+3}{3-x}\)
=\(\dfrac{x^3-3}{\left(x+1\right)\left(x-3\right)}\)\(-\dfrac{2\left(x-3\right)}{x+1}\)\(-\dfrac{x+3}{x-3}\)
=\(\dfrac{x^3-3-2x^2+12x-18-x^2-4x-3}{\left(x+1\right)\left(x-3\right)}\)
=\(\dfrac{x^3-3x^2+8x-24}{\left(x+1\right)\left(x-3\right)}\)
=\(\dfrac{\left(x-3\right)\left(x^2+8\right)}{\left(x-3\right)\left(x+1\right)}\)=\(\dfrac{x^2+8}{x+1}\)