Why these IPs are considered as overlapping?

Hi, I am doing the az 104 course, and in one of the quizzes this question is asked.

Why the IPs in the scenario B are overlapping? They have different subnet masks.

Answered in discord