Amewas interview question

Please explain your approach to problem solving.