is like forgetfulness in the Book of Allah and in the words of the Messenger of Allah, peace and blessings be upon him. Allah Most High says:
“Our Lord, do not take us to task if we forget or make a mistake.” [al-Baqarah 2:286]
The Prophet, peace and blessings be upon him, said: “Indeed, Allah has pardoned my community for mistakes, forgetfulness, and what they are compelled to do.” (1)
Thus, if this person was ignorant, disregarding the proper sequence does not harm him, and we say: Your prayer is valid. This is the correct view.
Issue: Is the proper sequence waived when one fears missing the congregational prayer?
Answer: According to the madhhab, the proper sequence is not waived. We say: Begin with the missed prayer, then pray the current prayer with the congregation if you catch it; otherwise, there is nothing upon you.
Some scholars held that the proper sequence is waived when one fears missing the congregational prayer (2), especially according to the view that congregational prayer is a condition for the validity of the prayer. In that case, one must perform the current prayer with the congregation first, and then pray the missed prayer.