Thales interview question

Classic overlapping time interval question