Praise be to Allah.
The spotting that comes at times other than the regular monthly period does not prevent one from praying and fasting. This is because Umm ‘Atiyyah (may Allah be pleased with her) said: “We did not regard yellowish and brownish discharge after tuhr (becoming pure) as being of any significance.” (Narrated by al-Bukhari (326) and Abu Dawud (307). Classed as sahih by al-Albani in Sahih Abi Dawud.)
If a woman has become pure from her menses, what she sees after that of spotting is not regarded as menses. And these secretions are pure (tahir) so she does not have to wash them from her clothes. This is the view of Abu Hanifah and Ahmad, and it is one of the two views narrated from al-Shafi'i, and it was classed as sound by al-Nawawi.
This view was also favoured by Shaykh Ibn ‘Uthaymin. May Allah have mercy upon them all.
It says in al-Sharh al-Mumti’ (1/392):
“If these secretions result from intercourse, they are pure (tahir), because they are not the waste products of eating and drinking, so they are not urine, and the basic principle is that things are not impure (najis) unless there is evidence to that effect. And because if a man has intercourse with his wife, he is not obliged to wash his penis or his clothes if anything gets onto them.” (Al-Majmu’ (1/406) and al-Mughni (2/88)
And Allah knows best.