Question: Is it always permissible to change the intention of an obligatory prayer to a recommended one or only to reach the congregation?
Answer: Changing the intention from the obligatory prayer to the recommended prayer is permissible only in two cases:
First: The noon prayer on Friday for a person who has forgotten to recite Surah Al-Jumu‘ah, is reciting another surah, and has reached/passed the middle of surah. In this case, he can intend his prayer to be supererogatory, complete the prayer and then say his noon prayer reciting Surah Al-Jumu‘ah.
Second: When a person starts an obligatory prayer but then congregational prayer starts and he is afraid of not reaching the congregation, in which case he can make his prayer supererogatory and complete the prayer in two rak‘ahs in order to reach the congregation.