To simplify the given expression, we need to factor each polynomial in the numerators and denominators. Once factored, we can cancel out any common factors between the numerators and denominators.
Step 1: Factor the Expressions
We start by factoring each polynomial in the expression:
\( x^2 - 3x - 4 = (x - 4)(x + 1) \)
\( x^2 - 6x + 8 = (x - 4)(x - 2) \)
\( x^2 - 7x + 10 = (x - 5)(x - 2) \)
\( x^2 + 5x + 4 = (x + 1)(x + 4) \)
Step 2: Rewrite the Expression
Substituting the factored forms into the original expression, we have: