If the fasting was broken due to a valid legal excuse, it is permissible to divide the make-up fasts over several years based on one’s ability. However, if a person passes away before completing the make-up fasts, the heirs must fast on their behalf or feed one needy person for each missed day.
If the fasting was broken without a valid excuse, one must hasten to make it up. Should the person die before completing the make-up fasts, the heirs must either fast or feed the needy on their behalf. As for the expiation, it is calculated after completing all the make-up fasts. And Allah Knows Best.