Praise be to Allah.
Combining acts of worship is of two types:
One type is not correct, which is in the case of acts of worship which are independent or are part of another. In these cases, intentions cannot be combined. For example, if a man misses the Sunnah of Fajr, and the sun comes up and the time for Salaat al-Duhaa comes, the Sunnah of Fajr cannot take the place of Salaat al-Duhaa, or vice-versa. They cannot be combined, because the Sunnah of Fajr is independent, and Salaat al-Duhaa is independent, and neither of them can take the place of the other.
The same applies if an act is connected to the one that comes before it – they cannot be combined. So if a man says, “I want to have the intention of praying both fard and sunnah when I pray Fajr,” we would tell him that this is not correct, because the Sunnah (of Fajr) is directly connected to the Fard, and cannot take its place.
The second type is where what is intended is not a specific act of worship. In this case, intentions may be combined. For example: a man enters the mosque where the people are praying Salaat al-Fajr. It is known that when a man enters the mosque, he should not sit down until he prays two rak’ahs, so if he joins the imaam in that prayer, this is good enough. Why? Because the point is that he should pray two rak’ahs when he enters the mosque. Similarly, if a man enters the mosque at the time of Salaat al-Duhaa and prays two rak’ahs with the intention of praying Salaat al-Duhaa, he does not have to pray Tahiyyat al-Masjid as well, but if he has the intention of both, that is better. This is the guideline for combining acts of worship.
In the case of fasting, fasting the Day of ‘Arafaah, for example, means that when this day comes you will be fasting, whether you intended it as one of the three days which you fast every month or as the Day of ‘Arafaah. But if you intended it as the Day of ‘Arafaah, it will not count as one of the three days; but if you intended it as one of the three days, that is good enough and will count as the Day of ‘Arafaah too. If you intended both, that is preferable.