While it's obvious that the expression simplifies, you have to remember that you can't divide by zero. Thus, the value of -2 for x is not allowed in the original function. If you simplify the function, it becomes x+1, x doesn't equal 2.