You can
put this solution on YOUR website!Simplify:

Factor the numerator and the denominator, as you have done.

Cancel the common factors (x+2)

Which is the answer that you got!
The restrictions that you have placed on the variable x don't seem to be correct.
If you look at the original expression, you will see that only when x = -2 will the denominator become zero. So the restriction on x ought to be x cannot = -2.
Does this make sense?