Add $ \dfrac{2}{x^2-x-2} $ and $ \dfrac{10}{x^2+2x-8} $ to get $ \dfrac{ \color{purple}{ 12x+18 } }{ x^3+3x^2-6x-8 }$.
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+4 }$ and the second by $\color{blue}{ x+1 }$.
$$ \begin{aligned} \frac{2}{x^2-x-2} + \frac{10}{x^2+2x-8} & = \frac{ 2 \cdot \color{blue}{ \left( x+4 \right) }}{ \left( x^2-x-2 \right) \cdot \color{blue}{ \left( x+4 \right) }} +
\frac{ 10 \cdot \color{blue}{ \left( x+1 \right) }}{ \left( x^2+2x-8 \right) \cdot \color{blue}{ \left( x+1 \right) }} = \\[1ex] &=\frac{ \color{purple}{ 2x+8 } }{ x^3+4x^2-x^2-4x-2x-8 } + \frac{ \color{purple}{ 10x+10 } }{ x^3+4x^2-x^2-4x-2x-8 } = \\[1ex] &=\frac{ \color{purple}{ 12x+18 } }{ x^3+3x^2-6x-8 } \end{aligned} $$