Subtract $ \dfrac{x+7}{x^2+3x-4} $ from $ \dfrac{5}{x+4} $ to get $ \dfrac{ \color{purple}{ 4x-12 } }{ x^2+3x-4 }$.
To subtract raitonal expressions, both fractions must have the same denominator.
We can create a common denominator by multiplying the first fraction by $\color{blue}{ x-1 }$.
$$ \begin{aligned} \frac{5}{x+4} - \frac{x+7}{x^2+3x-4} & = \frac{ 5 \cdot \color{blue}{ \left( x-1 \right) }}{ \left( x+4 \right) \cdot \color{blue}{ \left( x-1 \right) }} - \frac{ x+7 }{ x^2+3x-4 } = \\[1ex] &=\frac{ \color{purple}{ 5x-5 } }{ x^2-x+4x-4 } - \frac{ \color{purple}{ x+7 } }{ x^2-x+4x-4 }=\frac{ \color{purple}{ 5x-5 - \left( x+7 \right) } }{ x^2+3x-4 } = \\[1ex] &=\frac{ \color{purple}{ 4x-12 } }{ x^2+3x-4 } \end{aligned} $$