let the number of women using the gym be y
since the number of men using the gym is twice the number of women
(ratio is 2:1), therefore:
number of men using the gym is 2y
The total number of people using the gym is 24. Therefore:
y + 2y = 24
3y = 24
y = 24/3 = 8
Therefore:
number of women using the gym = 8 women
number of men using the gym = 2 x 8 = 16 men