(a(a3+2a2-a-2) + a2-1) / a(a2-1) =
The cubic expression factors:
= [a(a+2)(a2-1) + (a2-1)] / a(a2-1)
Now factor the (a2-1) out of the terms in the numerator:
= (a2-1)[a(a+2) + 1] / a(a2-1)
The (a2-1) terms in the numerator and denominator cancel. Multiply out the remaining terms in the numerator and combine like terms:
= [a2 + 2a + 1]/a
= (a+1)2/a