The town had 684 people then had a 25% growth spurt increasing the population by 684*.25 = 171 people
The town had 684 people then they added 171 people bringing the population to 684+171 = <<684+171=855>>855 people
There were 855 people and 40% moved away so it decreased by 855*.40 = 342
The population was 855 and 342 people moved away making the new population 855-342 = <<855-342=513>>513 people
#### 513