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. 

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.$$
