$$\frac{x^2+6x+5}{x^2-x-2}$$
$$\frac{(x+5)(x+1)}{(x-2)(x+1)}$$
$$\frac{x+5}{x-2}$, $ x \ne -1$$
My question is when it comes to specifying that $ x \ne -1$, the end result is also undefined where $x=2$, but I only need to state the condition for $-1$, correct?
The fraction $\frac{x^2+6x+5}{x^2-x-2}$ is defined when $x$ is not 2 or -1. Its roots could be -5 or -1. However, -1 is not defined there. So only -5 is a root. What you call "end result" is that $\frac{x+5}{x+2}$ is already not defined in 2. So depending on how the original question was formulated, you might or might not say that x can't be 2. Also, you didn't provide the actual question, so we can't know.