IBM interview question

to solve a puzzle