Explanation:
Let's represent the number of mochas bought with the variable
, and the number of lattes bought with the variable
.
Since there are
students, the total number of mochas and lattes bought must be
. This can be represented with the following equation:
We can also set up another equation based on the total amount spent on the coffe:
If we rearrange the first equation, we can solve for
:
If we substitute this into the second equation, we can solve for
:
Subtituting this back into the original equation, we can solve for
:
Therefore, 9 mochas and 14 lattes were bought.