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