Let c be children and a adults.
3.5c + 7a = 1771 (the total revenue is equal to the amounts made off of people)
c + a = 331 (total number of people)
The second formula becomes a = 331 - c. This can be substituted into the first formula.
3.5c + 7(331 - c) = 1771 = 7*331 - 3.5c = 1771. 7*331 = 2317, so 3.5c = 2317 - 1771 = 546.
546/3.5 = 156 = c (number of children).
c + a = 156 + a = 331 => a = 331 - 156 = 175 (number of adults).
There are 156 children and 175 adults