To find how much he made in the end, called the profit, we are going to need to find the cost of all the expenditures and the revenue he makes.
First, let's find how much he spent to actually obtain the bars to sell. We know he bought 32 of the bars, at a price of 4 bars for 3 monetary units (monetary units just means units for money - an example would be dollars). He would have to purchase 8 of these deals to get 32 bars in total, so in total he spent 3 * 8 = 24 monetary units. This can be found through expressions as well, as shown below:
Now, let's find how much money he made from selling the bars, or the revenue. First, he ate 2 of them, which he made no money from. So, he now has 30 bars which he can sell for a profit. He sold the rest of the bars at 3 bars for 4 monetary units. He sold 10 of these deals, which means he made 4 * 10 = 40 monetary units from all his sales. This can be solved using expressions, as shown below:
To find his profit, or the money he made considering his expenditures, we are going to subtract the cost of all his expenditures from his revenue. Thus, his final profit is:
40 monetary units - 24 monetary units = 16 monetary units