A:
If the condition of this woman is as mentioned in the question, it is obligatory on her neither to perform Salah nor fast, since, as mentioned in this case, she is not accountable for her actions. The Prophet (peace be upon him) said:
There are three whose actions are not recorded: an insane person until he is restored to sanity, a sleeper until he awakens, and a boy until he reaches puberty.
The person whose mind became disordered has the same ruling as an insane person. (Part No. 9; Page No. 82) May Allah grant us success. May peace and blessings be upon our Prophet Muhammad, his family, and Companions.