This is an example of mathematical induction from my textbook.
What I want to know is how the equation gets simplified to that. It's probably something simple but I just couldn't figure it out. Thanks!
$$ \begin{align} \frac{a(1+r^k)}{(1-r)} + ar^k &= \frac{a}{1-r}\cdot(1-r^k+r^k-r^{k-1}) \end{align} $$