Did not understand how the answer was calcukated

not able to understand how ans = max(include,exclude),i dont understand the logic behind this

hi @chitranshanmol07 please point out the timestamp in the video where this is given