I'm going through a discrete math program, and it's been quite a long time since I took algebra. As a result, I'm having difficulty understanding the steps of how my instructor came up with this result for the below equation. Can anyone help walk me through the steps?
$\frac{r^{n+1}-1}{r-1} + \frac{(r^{n+1})(r -1)}{r-1}$
$= \frac{r^{n+2}-1}{r-1}$
$$\frac{r^{n+1}-1}{r-1}+\frac{(r^{n+1})(r-1)}{r-1}$$ $$=\frac{r^{n+1}-1}{r-1}+\frac{(r^{n+1}r)-(r^{n+1}1)}{r-1}$$ $$=\frac{r^{n+1}-1}{r-1}+\frac{r^{n+2}-r^{n+1}}{r-1}$$ $$=\frac{r^{n+1}-1+r^{n+2}-r^{n+1}}{r-1}$$ $$=\frac{r^{n+1}-r^{n+1}+r^{n+2}-1}{r-1}$$ $$=\frac{r^{n+2}-1}{r-1}$$