The expression $\frac{1}{4}(m+1)[m(m^2+m+2)+4(m^2+2m+2)]$ can be re-written as $\frac{1}{4}(m+1)[m(m^2+m+2)+2(2m^2+4m+4)]$ which can be further re-written, when the portion inside square brackets are fully expanded, as $\frac{1}{4}(m+1)(m^3+5m^2+10m+8)$. The intermediate step seems unnecessary but it is the crux of my question.
It is known that $(m+2)$ is a factor of $(m^3+5m^2+10m+8)$, so after using long division, the full expression can again be re-factorised as $\frac{1}{4}(m+1)(m+2)(m^2+3m+4)$.
However, why was I unable to obtain this simply by factorisation at the initial stage?
Using a simple example,
$ax+bx-3a-3b$ can be factorised as $x(a+b)-3(a+b)=(a+b)(x-3)$
Going back to the main question, since it is verified that $(m+2)$ is a factor of $(m^3+5m^2+10m+8)$ = $[m(m^2+m+2)+2(2m^2+4m+4)]$, and since $m$ and $2$ were already factorised out in their respective brackets, why wasn't I able to obtain an expression $(m+2)(a^2+b+c)$ directly?
$(m^2+m+2)\not= (2m^2+4m+4)$ but it should have been equal because $(m+2)$ was already pulled out!
I am really puzzled by this because it seems to contradict the concepts of factorisation involving four terms (the simple example I gave). It doesn't make sense - what am I missing?