“Man” functions as a conditional noun. “Dakhala” is a past verb in a conditional construction; “fī ṣawm al-taṭawwuʿ” is a prepositional expression containing an iḍāfah.
“Af-sadahumā” is form IV past tense with the dual object pronoun referring to fasting and prayer. “Qaḍāhumā” expresses the legal consequence of the condition; its dual pronoun again refers to the two acts.