The ratio between the number of men and women in the city of Campo Verde is 2/3. The average age of men is 37 years and that of women is 42 years. What is the average age of the inhabitants of Campo Verde?
If $H$ denotes the number of men and $M$ the number of women, then $H / M=2 / 3$, so that $M=(3 H) / 2$ and, therefore, the population of Campo Verde is given by

$$
H+M=H+\frac{3}{2} H=\frac{5}{2} H
$$

If the average age of men is 37 years, then

$$
37=\text { average age of } H \text { men }=\frac{\text { sum of the ages of all men }}{H}
$$

so that $37H$ is the sum of the ages of all men. Similarly, $42M$ is the sum of the ages of all women. It follows that the sum of the ages of the entire population is given by

$$
37 H+42 M=37 H+42 \frac{3}{2} H=100 H
$$

Thus, the average age of the population of Campo Verde is

$$
\frac{37 H+42 M}{H+M}=\frac{100 H}{\frac{5 H}{2}}=\frac{100 \times 2}{5}=40 \text { years. }
$$