Addressya interview question

what is your approach for solving this specific problem