\(\frac{a^2+a+1}{a^2+3a+2}+\frac{1}{a^2+5a+6}\)
\(=\frac{a^2+a+1}{a^2+a+2a+2}+\frac{1}{a^2+2a+3a+6}\)
\(=\frac{a^2+a+1}{\left(a^2+a\right)+\left(2a+2\right)}+\frac{1}{\left(a^2+2a\right)+\left(3a+6\right)}\)
\(=\frac{a^2+a+1}{a\left(a+1\right)+2\left(a+1\right)}+\frac{1}{a\left(a+2\right)+3\left(a+2\right)}\)
\(=\frac{a^2+a+1}{\left(a+1\right)\left(a+2\right)}+\frac{1}{\left(a+2\right)\left(a+3\right)}\)
\(=\frac{\left(a^2+a+1\right)\left(a+3\right)}{\left(a+1\right)\left(a+2\right)\left(a+3\right)}+\frac{1.\left(a+1\right)}{\left(a+1\right)\left(a+2\right)\left(a+3\right)}\)
\(=\frac{a^3+3a^2+a^2+3a+a+3+a+1}{\left(a+1\right)\left(a+2\right)\left(a+3\right)}\)
\(=\frac{a^3+4a^2+5a+4}{\left(a+1\right)\left(a+2\right)\left(a+3\right)}\)