Let A = the number of adults and C = the number of children.
A + C = 40
10 A + 5C = 220
There a several ways to solve this system; here is one way.
From the first equation: A = 40 - C
Substitute in the second equation: 10(40 - C) + 5C = 220
Expand, collect terms, and then subtract 400 from each side: -5C = -180
Divide by -5
C = 36 and A = 4