ZS Associates interview question

How would you solve the second module of the given case study?