What if someone didn’t know about the penalty like kaffara or qadha for two months fasting, can penalty be exempted for him for the first time?

Question: I masturbated in Ramadhan and I did not know that masturbation is haram. How should I go about my previous fasts?
Answer: If you knew in the beginning that masturbation is haram and that it invalidates fasting, you should observe qadha and give kaffara. The kaffara is to either feed sixty poor and needy Shia people or fast for sixty days (31 days in a row). If you did not know the hukm (ruling) and masturbated due to inculpable (innocent) ignorance, your fast is in order and qadha is not necessary.