Praise be to Allah.
We praise Allah for having blessed you with guidance to Islam and adherence to its teachings, and we ask Allah to make us and you steadfast in Islam and on the straight path until we die.
You have to keep on asking for forgiveness for what you did of apostatising from Islam, and for what you fell into of shortcomings and negligence. We give you the glad tidings that Allah, may He be exalted, accepts repentance from His slaves and forgives their bad deeds, for Allah is Oft-Forgiving, Most Merciful.
Allah, may He be exalted, says (interpretation of the meaning):
“And He it is Who accepts repentance from His slaves, and forgives sins, and He knows what you do”
“Say: O ‘Ibaadi (My slaves) who have transgressed against themselves (by committing evil deeds and sins)! Despair not of the Mercy of Allah, verily, Allah forgives all sins. Truly, He is Oft‑Forgiving, Most Merciful.
‘And turn in repentance and in obedience with true Faith (Islamic Monotheism) to your Lord and submit to Him, (in Islam), before the torment comes upon you, then you will not be helped.
‘And follow the best of that which is sent down to you from your Lord (i.e. this Quran, do what it orders you to do and keep away from what it forbids), before the torment comes on you suddenly while you perceive not!’”
What you did of learning another religion, other than Islam, then practising it is clearly apostasy from the religion of Allah, may He be glorified and exalted, according to scholarly consensus, even if you continued to adhere to something of Islam. In fact even if you continued to practice all the obligatory duties of Islam, it is still apostasy, because failing to be resolved in adherence to Islam, or wavering between it and another religion, or following another religion, whilst still adhering to its rulings – all of that clearly constitutes apostasy from the religion of Allah, may He be glorified and exalted, and there is no doubt about that. No deeds based on Islamic teaching can be accepted from a person, no matter what he does, unless he repents from his apostasy and gives up everything apart from the religion of Islam.
Allah, may He be exalted, says (interpretation of the meaning):
“And whoever seeks a religion other than Islam, it will never be accepted of him, and in the Hereafter he will be one of the losers”
[Aal ‘Imraan 3:85]
“Truly, the religion with Allah is Islam”
[Aal ‘Imraan 3:19].
Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) said: Whoever believes that it is permissible for a person to observe whatever religious practices he likes, and that he is free to observe whatever religious practices he likes, is a disbeliever in Allah, may He be glorifies and exalted, because Allah, may He be exalted, says (interpretation of the meaning): “And whoever seeks a religion other than Islam, it will never be accepted of him” [Aal ‘Imraan 3:85] and “Truly, the religion with Allah is Islam” [Aal ‘Imraan 3:19].
It is not permissible for anyone to believe that any religion other than Islam is permissible, and that it is permissible for a person to worship Allah according to that religion; rather if he believes that, then the scholars have clearly stated that he is a disbeliever whose disbelief puts him beyond the pale of Islam.
End quote from Majmoo‘ al- Fataawa (3/100)
And he said: We believe that the teachings of the Prophet (blessings and peace of Allah be upon him) are the religion of Islam which Allah, may He be exalted, has chosen for His slaves, and that Allah, may He be exalted, does not accept any other religion from anyone.
We think that anyone who claims nowadays that any religion is acceptable to Allah, other than the religion of Islam, such as Judaism, Christianity or anything else, is a disbeliever. He should be asked to repent, and if he repents, all well and good; otherwise he is to be executed as an apostate, because he has disbelieved in the Qur’an.
End quote from ‘Aqeedat Ahl as-Sunnah wa’l-Jamaa‘ah (p. 21)
Once this is established, if the apostate repents and returns to Islam, then he does not have to do make up the prayers and fasts that he did not do during the time of his apostasy, because Islam erases what came before it and repentance destroys what came before it.
Shaykh al-Islam Ibn Taymiyah (may Allah have mercy on him) was asked: Does the apostate have to make up prayers and fasts if he comes back to Islam and repents to Allah?
He does not have to do make them up. Whoever repents, Allah will accept his repentance. If a person did not pray, or he did any of the things that nullify Islam, then Allah guides him and he repents, then he does not have to make up (those acts of worship). This is the correct scholarly view, because Islam erases what came before it and repentance destroys what came before it. Allah, may He be glorified and exalted, says (interpretation of the meaning): “Say to those who have disbelieved, if they cease (from disbelief) their past will be forgiven. But if they return (thereto), then the examples of those (punished) before them have already preceded (as a warning)” [al-Anfaal 8:38]. So Allah, may He be glorified and exalted, has told us that if the disbeliever becomes Muslim, Allah will forgive him his previous sins.
And the Prophet (blessings and peace of Allah be upon him) said: “Repentance erases what came before it and Islam destroys what came before it.”
End quote from Majmoo‘ Fataawa Ibn Baaz (29/196)
It says in Fataawa al-Lajnah ad-Daa’imah: If the apostate comes back to Islam, he does not have to make up the prayers, fasts and zakaah that he failed to do during the time of his apostasy.
The righteous deeds that he did as a Muslim before apostatising are not nullified by his apostasy if he comes back to Islam, because Allah, may He be glorified, has made their nullification dependent upon his dying as a disbeliever. Allah, may He be glorified and exalted, says (interpretation of the meaning):
“Verily, those who disbelieve, and die while they are disbelievers, it is they on whom is the Curse of Allah and of the angels and of mankind, combined”
“And whosoever of you turns back from his religion and dies as a disbeliever, then his deeds will be lost in this life and in the Hereafter”
End quote from Fataawa al-Lajnah ad-Daa’imah (2/9)
Based on that, if the situation is as you described, and you have repented from apostasy and come back to the religion of Islam, and you have given up all other religions, then you do not have to make up what you omitted deliberately of prayer and fasting, or the days when you did not fast during Ramadan because of your menses, apart from the first year and the years that followed it.
You have to keep on asking Allah for forgiveness and do a lot of supererogatory acts of worship, as well as persisting in praying and fasting in the future, and not being careless about it.
We ask Allah to guide us and you, and to enable us to do that which He loves and which pleases Him, and to remain steadfast in adhering to His religion until death.
And Allah knows best.