Since we only bought one cheese, the amount of money needed to pay for it could be identifiable by the price of one cheese (no need to use variable). The groceries are the opposite since we do not posses any information regarding their prices, so we could replace it with a variable.
The expression could be written as:
11 + 5 + g and 5 + 11 +g
or
(11 + 5) + g and 11 + (5 + g)