The formula can be written as #sum_{n=0}^{infty}a*r^{n}=a/(1-r)# whenever #|r|<1#.
In the present example, #a=-10# and #r=0.2# so the answer is #(-10)/(1-0.2)=-10/0.8=-10 * 5/4 = -25/2 = -12.5#.
To derive the formula #sum_{n=0}^{infty}a*r^{n}=a/(1-r)#, consider the #k^{th}# partial sum #s_{k}=sum_{n=0}^{k}a*r^{n}#. Multiplying both sides of this equation by #r# gives #rs_{k}=sum_{n=0}^{k}a*r^{n+1}=sum_{n=1}^{k+1}a*r^{n}#.
Therefore, #(1-r)s_{k}=s_{k}-rs_{k}=a-ar^{k+1}#, implying that, when #r !=1#, #s_{k}=(a(1-r^{k+1}))/(1-r)#. (When #r=1#, then #s_{k}=(k+1)a#.)
If #|r|<1#, then #r^{k+1}->0# as #k->infty#. This leads to the conclusion that
#sum_{n=0}^{infty}a*r^{n}=lim_{k->infty}s_{k}=(a(1-0))/(1-r)=a/(1-r)# when #|r|<1#.
When #|r| >=1#, then the sequence #(r^{k+1})# diverges, making #(s_{k})# diverge, leading to the conclusion that the series #sum_{n=0}^{infty}a*r^{n}# diverges.