How to factor $a^3 - b^3$? I know the answer is $(a - b)(a^2 + ab + b^2)$, but how do I arrive there? The example in the book I'm following somehow broke down $a^3 - b^3$ into $a^3 - (a^2)b + (a^2)b - a(b^2) + a(b^2) - b^3$ and factored that into $(a-b)(a^2 + ab + b^2)$ from there, but I don't quite understand how it was done.

Long division makes it as easy as $1$, $2$, $3$: 
$$\begin{align}
\frac{a^3-b^3}{a-b}&=a^2+\frac{ba^2-b^3}{a-b} \tag 1\\\\
&=a^2+ab+\frac{b^2a-b^3}{a-b} \tag 2\\\\
&=a^2+ab+b^2 \tag 3
\end{align}$$
as was to be shown!
Note that in $(1)$, the term $\frac{ba^2-b^3}{a-b}$ is the remainder of $a^2$ in $\frac{a^3-b^3}{a-b}$.
Note that in $(2)$, the term $\frac{b^2a-b^3}{a-b}$ is the remainder of $ab$ in $\frac{ba^2-b^3}{a-b}$.
Note that in $(3)$ the remainder is zero after dividing $b^2a-b^3$ by $a-b$.
