First 30 g → $0.30 Left with = 138 − 30 = 108 g
Next 50 g → $0.50 Left with = 108 − 50 = 58 g
Number of additional 40 g = 58 ÷ 40 = 1 R 18 → 2 When any remainder is counted as 1 additional 40 g or less. Additional cost = 2 × 0.6 = $1.20
Total = 1.2 + 0.5 + 0.3 = $2