ZS Associates Interview Question

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