There are three groups of people: 25 years old and younger, between 25 to 50, and 50 years old and older. Their fractions must equal to 1 because these three together form the whole.
1 = 1/3 + 2/7 + x
where x is the fraction for people ages 25 to 50 years old
x = 8/21
So, the actual number of people ages 25 to 50 years old is:
84(8/21) = 32 people