Pregunta de entrevista de IBM

Solve these problems using everything you know?