Commodities: volume 5 page 187~189 Example 2 and 3

Can anyone shed some light on these 2 examples?

I don’t understand the calculation

Thanks