Pergunta de entrevista da empresa BMW Group

How would you approach solving this problem?