(y^2-y+2)/(y+2)

The numerator: Are you sure that's a +2 ? Perhaps it should be -2. Please

check.