What is the ruling on the cessation of blood after (40) days from delivery, but later continued sporadically during two days of Ramadan?
Once postpartum bleeding (Nifas) ceases, and the woman is certain that it won`t reoccur, then she becomes ritually pure and so she is free to make Ghusl (purificatory bath), pray, and fast. If the bleeding reoccurs before fifteen days from its cessation, and before the end of (60) days after delivery, then the ruling on postpartum bleeding is effective, and her fasting and prayer are null and void, thus she must make up the fasting that she missed and not the prayer during those particular days.
Is a woman`s prayer considered invalid if non-Mahrams (marriageable men) saw her offering it?
A woman`s prayer isn`t invalidated if non-Mahrams saw her offering it, but she had better pray in isolation.
Is the marriage contract considered valid if concluded at home by the marriage official (Ma`zon)?
Yes, it is valid as long as it is registered at the court.
What is the ruling on performing istinja' before every ablution?
Istinja' is not from the conditions for the validity of ablution. It is only obligatory for prayer when there is impurity from urine or stool on the private part, or if there is fear of the impurity spreading to the body or clothing. And Allah the Almighty knows best.