Pennatronics interview question

How do I problem solve