APL Care interview question

How to solve the problem