Cummins Interview Question

How to overcome problem?