Answer
$\left\{x|x \ne 2, x\ne -1\right\}$
Work Step by Step
Factor the trinomial in the denominator to obtain:
$=\dfrac{x^2+1}{(x-2)(x+1)}$
The denominator of a rational expression is not allowed to be equal to zero as it makes the rational expression undefined.
Note that when x=2 or x=-1, the denominator will be equal to 0.
Thus, the domain of the expression is any real number except $2$ and $-1$.