Request help in understanding the telescoping sum for the given series.
For $n\geq1$,
\begin{align}
(a-b)\sum_{i=0}^{n-1}a^ib^{n-1-i}&=\sum_{i=0}^{n-1}a^{i+1}b^{n-1-i}-\sum_{i=0}^{n-1}a^ib^{n-i}\\
&=\sum_{i=0}^{n-1}(a^{i+1}b^{n-(i+1)}-a^ib^{n-i})\\
&=a^n-b^n&&(\text{telescoping sum})
\end{align}
I mean the conversion from the second last step to the last step is not clear.
Given$$ \sum_{i=0}^{n-1}(a^{i+1}b^{n-(i+1)}-a^ib^{n-i})\\$$ Change the index of summation on the first sum: $$=\sum_{i=1}^na^ib^{n-i} - \sum_{i=0}^{n-1}a^ib^{n-i}$$ Take out the $i=n$ term from the first sum and the $i=0$ term from the second, combining the rest:
$$=a^n+\sum_{i=1}^{n-1}(a^ib^{n-i}-a^ib^{n-i})-b^n$$
$$=a^n+0-b^n = a^n-b^n$$