We know each drink costs 3 dollars and each box of candy costs x dollars.
Charlie bought 2 drinks and 1 box of candy, so the expression is:

Tyrell bought 1 drink and 3 boxes of candy, so the expression is:

The expression to know how muxh Charlie spent is:

So, the expression is 3-2x.