Praise be to Allah.
If the situation is as described, then you have to fast the days that you owe first, then after that it is permissible to you to fast the days that your wife owed, because the Prophet (blessings and peace of Allah be upon him) said: “If a person dies owing fasts, his next of kin should fast them on his behalf.” Saheeh - Agreed upon. The next of kin is the relative, and you are in that position.
And Allah is the source of strength. May Allah send blessings and peace upon our Prophet Muhammad and his family and Companions. End quote.
Standing Committee for Academic Research and Issuing Fatwas