EY interview question

Two case quetion