He prays two rak`ahs, intending four supererogatory prayers at the same time; is that valid?
Question

Sometimes I miss the Sunnah prayer that comes after an obligatory prayer, then I remember it after the adhan for the following prayer. Is it permissible for me to have four intentions when offering the two rak`ahs between the two calls to prayer [adhan and iqamah], namely prayer to greet the mosque (tahiyyat al-masjid), the Sunnah prayer after doing wudu’, the Sunnah prayer between the two calls to prayer, and the Sunnah prayer following an obligatory prayer that I missed?
Praise be to Allah.It is valid to combine intentions for acts of worship if the action is the same, on condition that these acts of worship are not all acts that are intended for their own sake, or that one of them is intended for its own sake and the others are not like that. In that case, it is valid to include other acts of worship with it in one’s intention.
Shaykh Ibn `Uthaymin (may Allah have mercy on him) said:
Some Sunnah acts of worship are intended for their own sake, and in that case they cannot be put together, because the purpose of prescribing them is only so that one will pray. For example, the purpose behind the prescription of the Sunnah prayer after wudu’ is so that you will pray two rak`ahs after doing wudu’, whether those two rak`ahs are the Sunnah prayer following wudu’, or the two rak`ahs of Duha, or the regular Sunnah prayer of Zuhr, or the regular Sunnah prayer of Fajr, or the Sunnah prayer that is offered between the adhan and iqamah, because between each two calls to prayer there is a prayer. Similarly, when offering the prayer to greet the mosque (tahiyyat al-masjid) when you enter the mosque, it is permissible to pray with the intention of offering the regular Sunnah prayer, and it will also count as the prayer to greet the mosque.
But if the act of worship is intended for its own sake, then it cannot be put together with another Sunnah prayer of the same type.
End quote from Liqa’ al-Bab al-Maftuh, 25.
Based on that, It is permissible for you to intend, when praying the two rak`ahs to make up the regular Sunnah prayer that you missed, to also offer the prayer to greet the mosque, the two rak`ahs after wudu’ and the two rak`ahs between the adhan and iqamah. That is because the regular Sunnah prayer is intended for its own sake, and the other prayers that you intend along with it are not intended for their own sake; rather the purpose is that you should pray.
Shaykh Khalid al-Mushayqih said:
If you do wudu’ and come to the mosque intending to offer the regular Sunnah prayer, the prayer to greet the mosque and the two rak`ahs after wudu’, then you will have offered and attained the reward for three prayers by praying two rak`ahs. This is the benefit of having the intention to do all three together.
Similarly, if a person does wudu’ for Duha, and prays two rak`ahs with the intention of offering the two rak`ahs after wudu’ and two rak`ahs of Duha, then he will have offered two prayers by praying two rak`ahs.
End quote from al-`Aqd ath-Thamin, p. 161.
See also the answers to questions no. 220914 and 239229.
And Allah knows best.