5. Mr. Wang deposited $a$ yuan in the bank on July 1, 2000, for a one-year fixed savings; on July 1, 2001, he withdrew the principal and interest of the matured deposit, added another $a$ yuan, and deposited it again for a one-year fixed savings. Thereafter, every July 1, he followed the same method to deposit money in the bank. Assuming the annual interest rate $r$ for the one-year fixed savings at the bank remains unchanged, by July 1, 2005, when he withdraws all the deposits and interest, the total amount of money he will withdraw is ( ) yuan.
A. $a(1+r)^{5}$
B. $\frac{a}{r}\left[(1+r)^{5}-(1+r)\right]$
C. $a(1+r)^{6}$
D. $\frac{a}{r}\left[(1+r)^{6}-(1+r)\right]$
5. D On July 1, 2001, together with the $a$ dollars he deposited, the total is $a(1+r)+a$. On July 1, 2002, together with the $a$ dollars he deposited, the total is $a(1+r)^{2}+a(1+r)+a, \cdots,$ On July 1, 2005, the total is $a(1+r)^{5}+a(1+r)^{4}+\cdots+a(1+r)$.