Select the best option from the four alternatives.
What was the problem? Why _________leave early?
have you to
did you have to
you had to
What was the problem? Why did you have to leave early?
Did you have to leave early asks the question incorrect tense, as the earlier action is in the past.