Aloha :)
Willkommen in der Mathelounge... \o/
$$R_0q^n=r\,\frac{q^n-1}{q-1}\quad\big|\cdot\frac{q-1}{r}$$$$\frac{(q-1)R_0}{r}\,q^n=q^n-1\quad\big|-q^n$$$$\frac{(q-1)R_0}{r}\,q^n-q^n=-1\quad\big|\cdot(-1)$$$$q^n-\frac{(q-1)R_0}{r}\,q^n=1\quad\big|\text{\(q^n\) ausklammern}$$$$q^n\left(1-\frac{(q-1)R_0}{r}\right)=1\quad\big|\ln(\cdots)$$$$\ln(q^n)+\ln\left(1-\frac{(q-1)R_0}{r}\right)=\ln(1)=0\quad\big|\ln(a^b)=b\ln(a)$$$$n\ln(q)+\ln\left(1-\frac{(q-1)R_0}{r}\right)=0\quad\big|-\ln\left(1-\frac{(q-1)R_0}{r}\right)$$$$n\ln(q)=-\ln\left(1-\frac{(q-1)R_0}{r}\right)\quad\big|\div\ln(q)$$$$n=-\frac{\ln\left(1-\frac{(q-1)R_0}{r}\right)}{\ln(q)}$$