AppLogic Networks interview question

Problem on sum of Pairs