In 2010
number of people living in Huntsville = 1000
number of people living in Charlestown = 4000
Huntsville's population doubles every 10 years. Therefore, the formula will be

Charlestown's population is predicted to increase by 1000 every ten years. Therefore,

The first year that will show Huntsville with a larger population than Charlestown can be computed below
Huntsville population
2010 = 1000
2020 = 2(1000) = 2000
2030 = 2(2000) = 4000
2040 = 2(4000) = 8000
Charleston population
2010 = 4000
2020 = 1000 + 4000 = 5000
2030 = 5000 + 1000 = 6000
2040 = 6000 + 1000 = 7000
Therefore, by 2040 will be the first census year Huntsville will show a larger population than Charlestown.