Shopee Interview Question

How to calculate cost based on things