Pregunta de entrevista de Knowledgehook

How do you solve this problem?