Accenture interview question

How did you arrive at this solution?