First clause: a voluntary act was actually begun and subsequently invalidated, so the corresponding make-up is required in Hanafi law.
Second clause: the duty to fast did not exist when the Ramadan day began, but legal responsibility arose during it. Abstention is required for the remainder, followed by fasting on subsequent days, without a retrospective make-up duty.
The legal causes are different: commitment by initiation versus commencement of legal responsibility.