Add $ \dfrac{x^2+7x+12}{x^2+2x} $ and $ \dfrac{x+2}{x^2-x-12} $ to get $ \dfrac{ \color{purple}{ x^4+7x^3-3x^2-92x-144 } }{ x^4+x^3-14x^2-24x }$.
To add raitonal expressions, both fractions must have the same denominator.
We can create a common denominator by multiplying the first fraction by $ \color{blue}{ x^2-x-12 }$ and the second by $\color{blue}{ x^2+2x }$.
$$ \begin{aligned} \frac{x^2+7x+12}{x^2+2x} + \frac{x+2}{x^2-x-12} & = \frac{ \left( x^2+7x+12 \right) \cdot \color{blue}{ \left( x^2-x-12 \right) }}{ \left( x^2+2x \right) \cdot \color{blue}{ \left( x^2-x-12 \right) }} +
\frac{ \left( x+2 \right) \cdot \color{blue}{ \left( x^2+2x \right) }}{ \left( x^2-x-12 \right) \cdot \color{blue}{ \left( x^2+2x \right) }} = \\[1ex] &=\frac{ \color{purple}{ x^4-x^3 -\cancel{12x^2}+7x^3-7x^2-84x+ \cancel{12x^2}-12x-144 } }{ x^4-x^3-12x^2+2x^3-2x^2-24x } + \frac{ \color{purple}{ x^3+2x^2+2x^2+4x } }{ x^4-x^3-12x^2+2x^3-2x^2-24x } = \\[1ex] &=\frac{ \color{purple}{ x^4+7x^3-3x^2-92x-144 } }{ x^4+x^3-14x^2-24x } \end{aligned} $$