A ratio shows the relationship between quantities.
The ratio in this question says that for every 7 men there are 9 women.
A ratio can be multiplied by a constant value but will always remain the same ratio. 14 men and 18 women is still 7 men for every 9 women.
So you just need to find the ratio multiplier "x" by adding the number of men and women to get 1504 people total.
7x + 9x = 1504
16x = 1504
x = 1504/16
x = 94
Men; 7×94= 658
Women; 9×94=846