Let T be the total number of people......
The, the men = .24T .... The number of boys =(3/8)*.24T = .09T ..... The number of women = .36T and The number of girls = (1 - .24 - .09 - .36)T = .31T
And we know that
.24T + 504 = .31T subtract . 24T from both sides
.07T = 504 divide both sides by .07
T =504/.07 = 7200 = T = the total number of people
And the number of males = (.24 + .09)(7200) = .33(7200) = 2376
And the number of females is (.31 + .36)T = (.67)(7200) = 4824
