To simplify the expression
\[ \frac{t-5}{1-t} - \frac{t+4}{t+1} + \frac{t+2}{t^2 - 1}, \]
we start by rewriting \(t^2 - 1\) because it can be factored into \((t-1)(t+1)\). The expression now reads:
\[ \frac{t-5}{1-t} - \frac{t+4}{t+1} + \frac{t+2}{(t-1)(t+1)}. \]
Notice that \(1 - t = -(t - 1)\), so we can rewrite the first term as:
\[ \frac{t-5}{-(t-1)} = -\frac{t-5}{t-1}. \]
Now the expression becomes:
\[ -\frac{t-5}{t-1} - \frac{t+4}{t+1} + \frac{t+2}{(t-1)(t+1)}. \]
Next, we find the least common denominator (LCD) for all the terms. The denominators are \((t-1)\), \((t+1)\), and \((t-1)(t+1)\). Thus, the LCD is \((t-1)(t+1)\).
Now we convert each term to have a denominator of \((t-1)(t+1)\):
- For the first term:
\[ -\frac{(t-5)(t+1)}{(t-1)(t+1)}. \]
- For the second term:
\[
- \frac{(t+4)(t-1)}{(t+1)(t-1)}. \]
- The third term is already:
\[ \frac{t+2}{(t-1)(t+1)}. \]
Now we can rewrite the expression as:
\[ -\frac{(t-5)(t+1) + (t+4)(t-1) + (t+2)}{(t-1)(t+1)}. \]
Next, we compute the numerator:
\[ -(t-5)(t+1) = -((t^2 + t - 5t - 5)) = -t^2 + 4t + 5, \]
\[ -(t+4)(t-1) = -(t^2 - t + 4t - 4) = -t^2 + 3t + 4, \]
So combining gives:
\[ (-t^2 + 4t + 5) + (-t^2 + 3t + 4) + (t + 2). \]
Combine the like terms:
\[ -2t^2 + (4t + 3t + t) + (5 + 4 + 2) = -2t^2 + 8t + 11. \]
Therefore, the final expression is:
\[ \frac{-2t^2 + 8t + 11}{(t-1)(t+1)}. \]
Now we can simplify the final expression if possible, but \( -2t^2 + 8t + 11 \) doesn't have a simpler factorization.
So the final simplified expression is:
\[ \frac{-2t^2 + 8t + 11}{(t-1)(t+1)}. \]