Pregunta de entrevista de the LEGO Group

How I would solve 2 different tasks