Praise be to Allah.
The fidyah (ransom) can only be paid to the poor and needy. Based on that, if these orphans were poor, it was permissible to give it to them, but if they were independent of means, it is not permissible to give it to them and you have to pay it again.
You did well to give it in the form of food, because this is the basic principle with regard to that which Allaah has enjoined should be given in the form of food, and the fidyah cannot be given in the form of money. This is the correct view with regard to giving food in the case of offering expiation for breaking a vow, zihaar (a jaahili form of divorce), paying zakaat al-fitr, and other cases in which Allaah has enjoined giving food.
With regard to the question at hand, which is giving food as well as making up missed fasts for a person when another Ramadaan comes before they made up the fasts they owed, there is a difference of opinion among the scholars. We have discussed this matter in detail in the answer to question no. 26865, in which we explained that if a person delays making up missed fasts until the next Ramadaan because of an excuse such as ongoing illness, travel, pregnancy or breastfeeding, then he or she only has to make up the fasts, but if there was no excuse, then the one who delayed it has to repent and seek forgiveness, and – according to the majority of scholars – he has to offer a fidyah by feeding one poor person for each day, as well as making up the fasts. We stated that the correct view is that the fidyah is not required, but if one does that in order to be on the safe side, that is good.
Here we will explain another point, which is what is mentioned in your question, that it is permissible to pay the fidyah before starting to make up the fasts, because the fidyah is connected to the delay in making up the fasts, and it is not connected to beginning to make them up.
Based on this, it is permissible to pay the fidyah the day when one is going to make up a missed fast, or before or after that.
It says in al-Mawsoo’ah al-Fiqhiyyah (28/76):
Making up missed Ramadaan fasts may be done at any time but the majority limited it to a specific time, which is before the next Ramadaan comes, because ‘Aa’ishah (may Allaah be pleased with her) said: I would owe fasts from Ramadaan and I would not be able to make them up until Sha’baan, because of my concern for the Prophet (peace and blessings of Allaah be upon him). Similarly the first prayer should not be delayed until the time of the next prayer.
According to the majority it is not permissible to delay making up missed Ramadaan fasts until the next Ramadaan with no excuse, because of this hadeeth of ‘Aa’ishah. If one delays it he must offer the fidyah, feeding one poor person for each day, because of the reports narrated from Ibn ‘Abbaas, Ibn ‘Umar and Abu Hurayrah (may Allaah be pleased with them) who said concerning one who owes fasts but did not fast them until the next Ramadaan came: He must make them up and feed a poor person for each day. This is the fidyah for delaying it. … And it is permissible to give the food before making up the fast, at the same time, or afterwards. End quote.
But it is better – according to those who say it is obligatory to offer the fidyah for delaying making up the fasts, or who think that is more on the safe side, to give it before making up the fasts, so as to hasten to do good and so as to avoid the consequences of delaying, such as forgetting.
Al-Mardaawi al-Hanbali (may Allaah have mercy on him) said:
He may give to the poor whatever is required for expiation, and it is permissible to give the food before making up the fast, at the same time or afterwards. al-Majd – i.e., Ibn Taymiyah the grandfather of Shaykh al-Islam – said: It is better to do it before, in our opinion, so as to hasten to do good and to avoid the consequences of delaying. End quote.
And Allaah knows best.