How to simplify this expression

Answer:
[tex]\dfrac{x+2}{x+1}[/tex]
Step-by-step explanation:
Factor the numerator and cancel common factors from numerator and denominator.
[tex]\dfrac{x^2-4}{(x-2)(x+1)}=\dfrac{(x-2)(x+2)}{(x-2)(x+1)}=\dfrac{x+2}{x+1}[/tex]