\(a=\dfrac{\left(3x-2\right)\left(x+1\right)-\left(2x+5\right)\left(x^2-1\right)}{x+1}\)
\(a=\dfrac{\left(3x-2\right)\left(x+1\right)-\left(2x+5\right)\left(x+1\right)\left(x-1\right)}{x+1}\)
\(a=\dfrac{\left(x+1\right)\left[\left(3x-2\right)-\left(2x+5\right)\left(x-1\right)\right]}{x+1}\)
\(a=3x-2-\left(2x+5\right)\left(x-1\right)\)
\(a=3x-2-2x\left(x-1\right)+5\left(x-1\right)\)
\(a=3x-2-2x^2+2x+5x-5\)
\(a=10x-7-2x^2\)