Atos interview question

Solving puzzle