let the population growth rate of the city is r
then
20000(1+r)^8=40000
(1+r)^8=2
8log(1+r)=log2
log(1+r)=log2/8=0.0376
1+r=10^0.0376=1.0905
r=0.0905
the population growth rate of the city is 9.05%
Let x(t) be the size of the population as a function of time
and let k be the growth rate
x(t)=x(0)e^(kt)
40000=20000e^(8k)
e^(8k)=2
8k=ln 2
k=ln 2/8
=0.0866 (corr. to 3 significant figures)