you basically want to write the total number of people using x and y for children and adults, and then write the cost function using the values you know for the ticket prices. next, you want to want to rearrange your total people equation so that you can write either x in terms of y or y in terms of x. finally, you can plug that into your cost equation and solve. (you then use the rearranged total people equation to solve for the other variable).
hope this helps :)