He should make up what he owes first, then fast on behalf of the deceased
Question

My wife died, may Allah have mercy on her, two weeks ago from the date of this letter, and she owed seven days fasts, which she did not fast during the previous Ramadan because of her monthly period. She died before she could make them up. Can I fast them on her behalf or not? Please note that I have a month that I have not made up. Or should I fast what I owe, then fast on her behalf?.
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