Final answer:
To find the price of a hamburger, set up a system of equations using the given information. Solve the equations to find the price of a hamburger.
Step-by-step explanation:
To find the price of a hamburger, we need to set up a system of equations based on the given information.
Let's assume the price of a hamburger is x dollars.
From the first part of the problem, we know that 5 students had hamburgers and 4 students had hot dogs, and the bill was $19.50. So, we can set up the equation: 5x + 4(2.50) = 19.50.
From the second part of the problem, we know that 4 students had hamburgers and 5 students had hot dogs, and the bill was $18.75. So, we can set up the equation: 4x + 5(2.50) = 18.75.
Solving these equations, we find that the price of a hamburger is $3.50.