how would you solve this problem?

Adult tickets to a play cost $12 and children's tickets cost $5. If 220 tickets were sold and $2542 was collected, how many of each kind of ticket was sold? There are 500 seats in the theater and 280 seats are already filled but we can ignore them.

I had the amount of children's tickets sold as n and the adults as 220-n, representing that if there were 220 tickets in all sold and there were n children's tickets sold, then the remaining would be the amount of adult tickets.
I set up the total as 5n for the children's tickets signifying that for every ticket you would multiply by 5 to get the total cost. How would you set up the adult's total cost?

5 n = money for n childrens' tickets

12 (220-n) = money for (220-n) adult tickets
5 n + 12 (220-n) = 2542
5n + 2640 - 12 n = 2542
-7n = - 98
n = 14
220 - n = 206

To set up the adult's total cost, you would multiply the number of adult tickets (220 - n) by the cost per adult ticket, which is $12. Therefore, the adult's total cost would be 12(220 - n).

To set up the adult's total cost, you would multiply the number of adult tickets sold (220 - n) by the cost per adult ticket ($12).

So, the equation for the total cost can be set up as:

5n + 12(220 - n) = 2542

This equation represents the total amount collected from selling children's tickets (5n) plus the total amount collected from selling adult tickets (12(220 - n)), which is equal to the total amount collected ($2542).