Rules for factoring out a and b from $a^k - b^k$? Not sure why two expressions are equivalent. I'm working on an inductive proof, and I came across this line but I'm not sure how these are equivalent. Here is the link if more detail is needed. It's in box 2, first line.
$a^k - b^k = (a-b) \sum_{i=0}^{k-1}(a^{k-i-1}b^{i})$
 A: Expand the right hand side:
$$\begin{align}(a-b)\sum_{i=0}^{k-1}a^{k-i-1}b^i&=a\sum_{i=0}^{k-1}a^{k-i-1}b^i-b\sum_{i=0}^{k-1}a^{k-i-1}b^i\\
&=\sum_{i=0}^{k-1}a^{k-i}b^i-\sum_{i=0}^{k-1}a^{k-i-1}b^{i+1}\\
&=\sum_{i=0}^{k-1}a^{k-i}b^i-\sum_{i=1}^{k}a^{k-i}b^{i}\\
&=a^k+\sum_{i=1}^{k-1}a^{k-i}b^i-b^k-\sum_{i=1}^{k-1}a^{k-i}b^{i}\\
&=a^k-b^k.\end{align}$$
A: The other way (left to right):


*

*First prove by induction the special case:
$$1-x^k=(1-x)\bigl(1+x+x^2+\dots+x^{k-1}\bigr).$$
The initial case ($k=1$) reduces to $\; 1-x=1-x$.
Suppose now the formula is established for some $k\ge 1$, and consider
So the inductive step is proved.


*

*Generalisation: we may suppose $a\ne 0$, and set $x=\dfrac ba$. Note that fot each $i$, $\;a^ix^i = b^i$, so


\begin{align}
a^k-b^k=a^k\bigl(1-x^k\bigr)&=a^k(1-x)\bigl(1+x+x^2+\dots+x^{k-1}\bigr)\\
&=a(1-x)\,a^{k-1}\bigl(1+x+x^2+\dots+x^{k-1}\bigr) \\
&=(a-b)\bigl(a^{k-1}+a^{k-2}(ax)+a^{k-3}(a^2x^2)+\dots+a^{k-1}x^{k-1}\bigr)\\
&=(a-b)\bigl(a^{k-1}+a^{k-2}b+a^{k-3}b^2+\dots+b^{k-1}\bigr).\\
\end{align}
