Combining the intentions for supererogatory prayers
Is it permissible to combine voluntary prayers such as the prayer for entering the mosque and the two rak`as between the adhan and iqama?
The Prophet [peace and blessings be upon him] encouraged us to pray two rak`as [cycles of prayer] upon entering the mosque and before sitting down. He said, "Whoever enters a mosque should perform two rak`as before sitting down" [Reported by Muslim and Bukhari. The hadith is Bukhari's wording]. It is permissible to combine the prayer for entering the mosque with the two rak`as prayed between the adhan and iqama.
This opinion was adopted by Shaf`i scholars and others. Al- Suyuti stated in his book Al-Ashbah wa al-Nadha`ir: "It is valid to start a prayer with the intention of performing both the prescribed prayer and the prayer for entering the mosque and [one] is rewarded [for both]."
Al-Nawawi stated in Sharh al-Muhadhib: "This was the unanimous opinion among our fellow scholars (the Shafi'is) and I did not find any difference regarding it after years of intensive research." In another text concerning combining the prayer for entering the mosque with another prayer, he said: "It is included in the prayer implictly even if [one] does not make the intention for praying it."
Prayer for entering the mosque
What is meant by the prayer for entering the mosque is the prayer observed upon entering the mosque and before sitting down. It may be any prayer: a prescribed prayer, missed prayer, sunna prayer [associated with prescribed prayers] or a voluntary prayer whether specific [such as the witr prayers] or non specific [such as general nawafil].
Allah Almighty knows best