Assuming you're able to reorder the data then the following might help:
Sort the columns in ascending order Driver 1st, License 2nd and Date 3rd.
In column D put formula:
=IF(AND(B2=B3, A2=A3), IF(DATE(YEAR(C2)+2, MONTH(C2), DAY(C2))<C3, "Gap", ""), "End")
and fill down.
It should...