Can someone make a formula for this problem?

Answer:
Step-by-step explanation:
solution 1 :
adult : 7 - x
child : x
total spend : 54.50 = (7 - x) * 9.5 + x * 6.5
we solve : 54.50 = 66.5 - 3x , x = 4
solution 1 :
adult : y
child : x
x + y = 7.......(1)
total spend : 54.50 = y * 9.5 + x * 6.5........(2)
we solve : x= 4 , y = 3