To simplify the expression
\[ \frac{\frac{x^2 - 4}{x - 3}}{\frac{x + 2}{x^2 + x - 12}}, \]
we start by rewriting it as follows:
\[ \frac{x^2 - 4}{x - 3} \cdot \frac{x^2 + x - 12}{x + 2}. \]
Next, we can factor the expressions in the fractions. The numerator \(x^2 - 4\) can be factored as:
\[ x^2 - 4 = (x - 2)(x + 2). \]
The polynomial \(x^2 + x - 12\) can be factored by finding two numbers that multiply to \(-12\) and add to \(1\). These numbers are \(4\) and \(-3\):
\[ x^2 + x - 12 = (x - 3)(x + 4). \]
Now we can substitute these factorizations into the original expression:
\[ \frac{(x - 2)(x + 2)}{x - 3} \cdot \frac{(x - 3)(x + 4)}{x + 2}. \]
Next, we can cancel the common factors. The \((x + 2)\) in the numerator and denominator cancels out, and the \((x - 3)\) in the numerator and denominator also cancels out, leaving us with:
\[ \frac{(x - 2)(x + 4)}{1} = (x - 2)(x + 4). \]
Now, we simplify this to:
\[ x^2 + 2x - 8. \]
Now, we need to state any restrictions on the variable \(x\). The original expressions had the following restrictions:
- From \(x - 3\) in the denominator, \(x \neq 3\).
- From \(x + 2\) in the denominator, \(x \neq -2\).
- The \(x + 2\) from the numerator doesn't impose any further restrictions.
Thus, our final answer is:
\[ x^2 + 2x - 8, \quad x \neq 3, \quad x \neq -2. \]