Expanding $(2^b-1)\cdot(1+2^b+2^{2b}+ \cdots + 2^{(a-1)b})$ Can someone please explain to me how the following works (primarily interested in an explanation of the second step when $2^b$ is expanded?
I understand how each series cancels out to equal $2^n-1$ at the end.
$$\begin{align*}
xy&=(2^b-1) \cdot (1 + 2^b + 2^{2b} + \cdots + 2^{(a-1)b})\\
&=2^b \cdot (1 + 2^b + 2^{2b} + \cdots + 2^{(a-1)b}) - (1 + 2^b + 2^{2b} + \cdots + 2^{(a-1)b})\\
&=(2^b + 2^{2b} + 2^{3b} + \cdots + 2^{ab})-(1+2^b+2^{2b}+ \cdots + 2^{(a-1)b})\\
&=2^{ab}-1\\
&=2^n-1
\end{align*}$$

$\begin{align*}
xy&=(2^b-1) \cdot (1 + 2^b + 2^{2b} + \cdots + 2^{(a-1)b})\\
\end{align*}$
Let $A = (1 + 2^b + 2^{2b} + \cdots + 2^{(a-1)b})$ so
$xy = (2^b-1)A = 2^b*A - A$.  Let's continue... 
$\begin{align*}
&=2^b \cdot (1 + 2^b + 2^{2b} + \cdots + 2^{(a-1)b}) - (1 + 2^b + 2^{2b} + \cdots + 2^{(a-1)b})\\
\end{align*}$
Note: $2^b \cdot (1 + 2^b + 2^{2b} + \cdots + 2^{(a-1)b})=2^b*1 + 2^b2^b + ...+2^b2^{(a-1)b}$
$= 2^b +2^{2b} + .... + 2^{ab}$.  And that's pretty much all the detail I can think to provide.  Continue...
$\begin{align*}
&=(2^b + 2^{2b} + 2^{3b} + \cdots + 2^{ab})-(1+2^b+2^{2b}+ \cdots + 2^{(a-1)b})\\
&=2^{ab}-1\\
&=2^n-1
\end{align*}$
