Swiggy interview question

Case based question. Find comission