Pergunta de entrevista da empresa RBC

How would you solve this case..