The Muslim has to learn the rulings of Islam that he needs to know, whether they are matters of ‘aqeedah (belief) and usool al-deen, or practical matters such as purity (tahaarah) and prayer. If he is wealthy then he has to learn the rulings on zakaah. If he is a businessman then he has to learn the rulings on financial transactions, and so on. When the month of Ramadaan is approaching, the Muslim who is accountable has to learn the rulings of fasting even if he is unable to fast, so that he may learn what he has to do instead of fasting.
So what you and your family have to do is to repent to Allaah and pray for forgiveness for your failure to ask and seek knowledge concerning this matter.
It is not permissible to give money, even for those who are unable to fast such as the elderly and chronically sick, because what they must do if they do not fast in Ramadaan is to feed one poor person for each day. Giving money instead of food for the days when they did not fast is not sufficient.
Based on this, we hope that the money you gave will count as charity for which you will be rewarded on the Day of Resurrection.
What you have to do is to make up those days when you did not fast. You can try to work them out until you reach the number which you are certain of. If you cannot do that then do what you think is most likely. If you think it most likely that the number is thirty days, for example, then you have to fast these days.
“Allaah burdens not a person beyond his scope”
You do not have to fast them one after another, rather it is permissible for you to fast them separately, according to what you are able to do. But you have to hasten to fast them and do not delay them again.
You should start by making up the Ramadaan of the last year first, so that the next Ramadaan will not come before you have observed these fasts.
Some of the scholars stated that as well as fasting you have to feed one poor person for each day, to make up for delaying the fast. But the more correct view is that you have to fast only, especially if you are poor. But if you can feed others as well as fast, that is good.
All of this is based on the assumption that you did not fast for a legitimate reason, such as menstruation. But if you had no legitimate excuse for breaking the fast, then you do not have to make up the fast, rather you have to repent to Allaah and pray for His forgiveness, and compensate for these days by observing naafil fasts and doing good deeds.
We have also discussed this matter and the fatwas of the scholars in the answer to question no. 50067.
And Allaah knows best.