MetLife interview question

if you understood the requirement