Cost of each ticket=$7
Assumed cost of popcorn=$6
Assumed cost of candy=$4
Cost of each drink=$2
Each friend must have a ticket and a drink, so the total cost of tickets and drinks=3(7+2).
If they each buy popcorn and candy this expression changes to 3(7+2+6+4). Therefore they each pay $19 and the total cost is $57.
If they share the popcorn and candy the expression becomes 3(7+2)+6+4=37. They each pay 7+2+10/3=$12.33 but someone has to pay the extra penny: 12.33+12.33+12.34=$37.
If they share the popcorn but each buys candy: 3(7+2+4)+6=45. They each pay 7+2+4+2=$15.