Explanation:
well, the mathematical structure is explicitly described in the text :
x + y = 50
30x + 20y = 1320
the first equation tells us
x = 50 - y
and then using this in the second equation
30(50 - y) + 20y = 1320
1500 - 30y + 20y = 1320
1500 - 10y = 1320
1500 = 1320 + 10y
180 = 10y
y = 18
x = 50 - y = 50 - 18 = 32
so, there were 32 adults and 18 children in the bus.