4.10.B: Calculate profit in a given situation.