Cancelation between a numerator and denominator can only occur when both terms are multiplied as a whole, not simply added.
In this case, the polynomial at the top needs to be converted to the root multiplication that lead to it: (x+1)^2, and the denominator needs to complete the square: (x-1)(x+1)+4, which would still be unable to have terms canceled (as there is still addition in the denominator that cannot be removed), so the original form is the valid answer.
It's a common thing drilled into students during these courses that you cannot simply cancel out terms at will - you have to modify polynomials first.
Around age 12 I read in a recreational maths book that 16/64=16̸/6̸4=1/4 works and I was lucky to encounter this at school while solving a problem on a whiteboard. This is not the case for this fraction but I wonder if there are any non-trivial examples of polynomial division where this works.