MetLife Interview Question

if you understood the requirement