PwC interview question

Mentioned above section for question