Shopee interview question

How to calculate cost based on things