Help to understand polynomial factoring I'm following some proof, but got stuck at how the factoring works. I can follow this part:
$$\begin{align*}
1^3 + 2^3 + 3^3 + \cdots + k^3 + (k+1)^3 &= \frac{k^2(k+1)^2}{4} + (k+1)^3\\
&= \frac{k^2(k+1)^2 + 4(k+1)^3}{4}\\
\end{align*}$$
The next two steps are not so clear to me anymore:
$$\begin{align*}
&= \frac{(k+1)^2(k^2 + 4k + 4)}{4}\\
&= \frac{(k+1)^2(k+2)^2}{4}.\\
\end{align*}$$
I understand that first $(k+1)^3$ was changed to have the same denominator as the main term (which is $4$). Can someone help me break down the steps how the polynomials are added then after that, the powers confuse me a bit. 
 A: Just looking at the numerators, 
$$k^2(k+1)^2+4(k+1)^3 =k^2(k+1)^2+4(k+1)(k+1)^2$$
$$ = (k+1)^2(k^2+4(k+1)) = (k+1)^2(k^2+4k+4)$$
$$=(k+1)^2(k+2)^2$$
For the second equality, I factored out the $(k+1)^2$ that appears in both terms; something of the form $ba+ca$ can be rewritten as $a(b+c)$. For the third equality, I just distributed the $4$, noting that $4(k+1)=4k+4$. Finally, $k^2+4k+4$ is of the form $a^2+2ab+b^2$, which can be rewritten as $(a+b)^2$; here, $a=k$ and $b=2$, giving us $(k+2)^2$. 
A: \begin{align}
k^2(k+1)^2 + 4(k+1)^3&=k^2(k+1)^2 + 4(k+1)(k+1)^2\\
&=(k+1)^2[k^2 + 4(k+1)]\\
&=(k+1)^2(k^2 + 4k+4)\\
&=(k+1)^2(k+2)^2\\
\end{align}
A: The first step that is troubling you is just factorization by $(k+1)^2$.
Consider the expression of the numerator:
$$k^2(k+1)^2+4(k+1)^3$$
which is equal to
$$(k+1)^2\times k^2+(k+1)^2\times4(k+1)=(k+1)^2(k^2+4(k+1))=(k+1)^2(k^2+4k+4).$$
The next step needs you to remark that
$$(k+2)^2=k^2+2\times k\times 2+2^2=k^2+4k+4.$$
A: $\frac{k^2 (k+1)^2 + 4(k+1)^3}{4} = (k+1)^2 \cdot \frac{k^2 + 4(k+1)}{4} = (k+1)^2 \cdot \frac{k^2 + 4k + 4}{4} = (k+1)^2 \cdot \frac{(k + 2)^2}{4}$
