Shopee interview question

How do you solve this particular problem?