Swiggy Interview Question

Case based question. Find comission