Subtract $x+7$ from $ \dfrac{5}{x+4} $ to get $ \dfrac{ \color{purple}{ -x^2-11x-23 } }{ x+4 }$.
Step 1: Write $ x+7 $ as a fraction by putting $ \color{red}{ 1 } $ in the denominator.
Step 2: To subtract raitonal expressions, both fractions must have the same denominator.
We can create a common denominator by multiplying the second fraction by $\color{blue}{x+4}$.
$$ \begin{aligned} \frac{5}{x+4} -x+7 & \xlongequal{\text{Step 1}} \frac{5}{x+4} - \frac{x+7}{\color{red}{1}} = \frac{ 5 }{ x+4 } - \frac{ \left( x+7 \right) \cdot \color{blue}{ \left( x+4 \right) }}{ 1 \cdot \color{blue}{ \left( x+4 \right) }} = \\[1ex] & \xlongequal{\text{Step 2}} \frac{ \color{purple}{ 5 } }{ x+4 } - \frac{ \color{purple}{ x^2+4x+7x+28 } }{ x+4 }=\frac{ \color{purple}{ 5 - \left( x^2+4x+7x+28 \right) } }{ x+4 } = \\[1ex] &=\frac{ \color{purple}{ -x^2-11x-23 } }{ x+4 } \end{aligned} $$