At a gathering, each girl was given 3 sweets and each boy was given 4 sweets. Each adult received 2 sweets. 1/5 of the people at the gathering were adults. The number of girls was 7/9 of the boys. If 2 340 sweets were given away, how many children were there altogether?

if there were a adults, b boys and g girls, then

3g + 4b + 2a = 2340
a = 1/5 (a+b+g)
g = 7/9 b
now solve and find b+g

number of boys ---- x

number of girls = (7/9)x

total of boys and girls = x + 7x/9 = 16x/9 <---- 4/5 of the total
total = boys and girls and adults
= 16x/9 + 1/5 total
(4/5) total = 16x/9
total = (5/4)(16x/9) = 20x/9
so adults = 1/5 total = (1/5)(20/9)x = 4x/9

4x + 3(7x/9) + 2(4x/9) = 2340
4x + 21x/9 + 8x/9 = 2340
65x/9 = 2340
x = 324

so we had 324 boys, 252 girls, and 144 adults , total kids = 576

check: number of sweets = 4(324) + 3(252) + 2(144) = 2340 , all is good!