Answer
$\frac{x^2-2x+14}{(x-3)(x+1)}$.
Work Step by Step
The given expression is
$=\frac{x}{x-3}+\frac{x+2}{x^2-2x-3}-\frac{4}{x+1}$
First denominator $=(x-3)$.
Second denominator $=x^2-2x-3$.
Rewrite the middle term $-2x$ as $-3x+1x$
$=x^2-3x+1x-3$
Group terms.
$=(x^2-3x)+(1x-3)$
Factor each term.
$=x(x-3)+1(x-3)$
Factor out $(x-3)$.
$=(x-3)(x+1)$
Third denominator $=(x+1)$
Substitute all factors into the given expression.
$=\frac{x}{x-3}+\frac{x+2}{(x-3)(x+1)}-\frac{4}{x+1}$
The LCM of all the denominators is $=(x-3)(x+1)$.
$=\frac{x}{x-3}\times \frac{x+1}{x+1}+\frac{x+2}{(x-3)(x+1)}-\frac{4}{x+1}\times \frac{x-3}{x-3}$
Simplify.
$=\frac{x(x+1)}{(x-3)(x+1)}+\frac{x+2}{(x-3)(x+1)}-\frac{4(x-3)}{(x+1)(x-3)}$
$=\frac{x(x+1)+x+2-4(x-3)}{(x-3)(x+1)}$
$=\frac{x^2+x+x+2-4x+12}{(x-3)(x+1)}$
Simplify.
$=\frac{x^2-2x+14}{(x-3)(x+1)}$.