First, set x for showbags and y for rides.
So now we need to make a system equations.
Since he bought 9 items, x+y=9.
And because he spent $78 and we know the price of each item, the second equation is 12x+7y=78.
Now solve for the system of equations by elimination.
12x+7y=78
-7(x+y=9)
Now the new equations are:
12x+7y=78
-7x-7y=-63
Now just subtract.
5x=15
x=3.
And since originally we made x represent showbags, he bought 3 showbags. Which means he bought 6 rides because 9-3=6.
If you wanna check your answer, just plug in.
x+y=9
3+6=9
12(3)+6(7)=78
36+42=78
Answer: Billy bought 3 showbags and 6 rides.