Can One Fast with Two Intentions?
Question

How can we differentiate between a fast that is intended for its own sake and a fast that is not intended for its own sake, so that the intention to combine them will be valid?
Praise be to Allah.Guidelines on combining acts of worship through the intention
The guideline on combining acts of worship through the intention is that one of them should not be intended for its own sake, so that it can be combined with another act of worship through the intention.
This may apply to fasting and other acts of worship.
In the case of fasting, the fast that is intended for its own sake includes the Ramadan fast, making up missed Ramadan fasts, fasting in fulfilment of a vow, and fasting on special days, such as the days of `Arafah and `Ashura’, and fasting on Mondays – noting that there may be different scholarly views regarding these days and whether they are intended for their own sake or not.
With regard to that which is not intended for its own sake, this refers to cases where the aim is to observe a type of recommended fast, without needing to observe the fast on any particular day, such as fasting three days of every month.
In that case, it is permissible to form the intention that you want to combine fasting the day of `Arafah or fasting on a Monday with fasting one of the three days of every month .
It says in Al-Mawsu`ah Al-Fiqhiyyah (12/24): 
“If someone combines two acts of worship through his intention, then if they can overlap, such as combining the Ghusl of Jumu`ah with Ghusl for Janabah, or combining Ghusl for Janabah and Ghusl following menses, or combining the Ghusls of Jumu`ah and `Eid; or if one of them is not intended for its own sake, such as combining two Rak`ahs to greet the mosque (Tahiyyat Al-masjid) with an obligatory prayer or another Sunnah prayer, then that does not undermine the act of worship, because, in principle, acts of purification can overlap. The prayer to greet the mosque and the like are not intended for their own sake; rather they are intended so as to use the place for prayer, and thus this prayer may be overlapped with other prayers.
Combining two acts of worship each of which meant to be done for its own sake
As for combining two acts of worship each of which is meant to be done for its own sake, such as combining Dhuhr with the regular Sunnah prayers that are connected to it, it is not valid to combine them with one intention, because they are two separate acts of worship that cannot overlap one another.” 
Dr. `Umar Sulayman Al-Ashqar (may Allah have mercy on him) said: The one who says that two acts of worship can be done in one action, as in the example above, [says that] because the Lawgiver’s purpose may be achieved by doing that one action, so greeting the mosque may be achieved by offering the obligatory prayer, whether the worshipper also intended to greet the mosque or did not, because the aim is to use the place for worship." (Maqasid Al-Mukallafin, p. 255)
Shaykh Ibn `Uthaymin (may Allah have mercy on him) was asked: Is it permissible for us to do one act of worship and intend thereby to do more than one, such as if a person enters the mosque at the time of the Adhan for Dhuhr, and prays two Rak`ahs, intending thereby to greet the mosque, offer the Sunnah prayer following Wudu and offer the regular Sunnah prayer before Dhuhr – is that valid?
He answered by saying:
“This concept is important: can acts of worship overlap? We say: 

Firstly, if the act of worship is connected to another act of worship, then the two cannot overlap. This is a basic principle.

For example: Fajr prayer is two Rak`ahs , and the Sunnah prayer that is connected to it is also two Rak`ahs. This Sunnah prayer is separate, but it is still connected to it. In other words, the regular Sunnah prayer of Fajr is complementary to it [the obligatory prayer]. So the Sunnah prayer cannot take the place of [the obligatory two Rak`ahs of] Fajr, and Fajr prayer cannot take the place of the Sunnah prayer, because the regular Sunnah prayer is connected to the obligatory prayer. Therefore if one act of worship is connected to another, it cannot take its place, and the original act of worship cannot take the place of the connected act.
Another example is: Jumu`ah prayer has a regular Sunnah prayer that is offered after it. Can the individual only offer Jumu`ah prayer [with an intention to combine it with the Sunnah prayer] so that he will not have to offer the Sunnah prayer that comes after it?
The answer is no. Why is that? It is because the Sunnah prayer of Jumu`ah is connected to it.

Secondly: if the two acts of worship are separate, each of them being distinct and not connected to the other, and each of them is done for its own sake, then the two acts of worship cannot overlap.

For example, if someone were to say: I am going to pray two Rak`ahs before Dhuhr, intending them to include the four Rak`ahs [of the obligatory prayer], because the regular Sunnah prayer before Dhuhr is four Rak`ahs with two Taslims, then if he says: I am going to pray two Rak`ahs and intend them to also include the four Rak`ahs [of the obligatory prayer] – that is not permissible, because the two acts of worship in this case are separate and not connected, and the purpose of each of them is different, so doing one of them cannot include the other.
For example, there is a regular Sunnah prayer after `Isha’ , then after the Sunnah prayer, there is Witr, which may be offered with three Rak`ahs with two Taslims, meaning that the worshipper prays two Rak`ahs followed by a single Rak`ah. If he says: I intend to make the regular Sunnah prayer of `Isha’ also include the two Rak`ahs and single Rak`ah of Witr, this is not permissible, because each of these acts of worship is separate from the other and each is done for its own sake, so this is not valid.

Thirdly: if one of the two acts of worship is not intended for its own sake – rather the purpose behind it is only for this type of worship – in this case, it is sufficient to do the original act and there is no need for the secondary act.

For example, a man enters the mosque before praying Fajr and after the Adhan has been given. In this case, he is required to do two things: to greet the mosque and to pray the Sunnah prayer [before Fajr]. As for greeting the mosque, the purpose behind it is so that you do not sit down until you have prayed two Rak`ahs. So if you pray the regular Sunnah [before Fajr], then you will have fulfilled the requirement of not sitting down until you have prayed two Rak`ahs, and this aim will have been achieved. But if you intend the secondary purpose, namely greeting the mosque, without also intending to offer the regular Sunnah prayer [before Fajr], then it will not be sufficient and will not include the regular Sunnah prayer, because the regular Sunnah prayer is intended for its own sake, and greeting the mosque does not necessarily have to be only two Rak`ahs.
With regard to the question asked by the questioner, which is about entering the mosque when the Adhan for Dhuhr is given and praying two Rak`ahs intending them to be for greeting the mosque, the Sunnah prayer following Wudu and the regular Sunnah prayer before Dhuhr combined:
If he intends them to be for both greeting the mosque and the regular Sunnah prayer, this is valid.
As for the Sunnah prayer following Wudu , we need to examine the Hadith in which the Messenger (blessings and peace of Allah be upon him) said: “Whoever does Wudu as I have done it, then prays two Rak`ahs in which he does not let his mind wander, he will be forgiven his previous sins.” Did the Prophet (blessings and peace of Allah be upon him) mean that there are two Rak`ahs that are to be done following Wudu, or did he mean that if you do Wudu, you should pray two Rak`ahs?
We think that if what he meant was that if you do Wudu, you should pray two Rak`ahs, then these two Rak`ahs are intended for their own sake. But if what he meant was that whoever prays two Rak`ahs after doing Wudu, no matter what his reason is for praying these two Rak`ahs, then in that case it is valid to intend those two Rak`ahs as the Sunnah prayer following Wudu, a prayer to greet the mosque and the regular Sunnah prayer before Dhuhr combined.
What appears to me to be the case – and Allah knows best – is that the Prophet’s words “then prays two Rak`ahs” did not refer to intending these two Rak`ahs for their own sake; rather what he meant is praying two Rak`ahs, even if they are part of an obligatory prayer. Based on that, we may say regarding the example mentioned by the questioner that these two Rak`ahs may be intended as a prayer to greet the mosque, the regular Sunnah prayer before Dhuhr and the Sunnah prayer following Wudu combined.
Another example is when a man does Ghusl on Friday to cleanse himself from Janabah. Can that also include Ghusl for Jumu`ah?
If, when doing Ghusl for Janabah he also intends to do Ghusl for Jumu`ah, it includes both, because the Messenger (blessings and peace of Allah be upon him) said: “Each man will have but that which he intended.” But if he intended to do Ghusl for Janabah [only], does that also include Ghusl for Jumu`ah ?
In this case, we should see whether Ghusl for Jumu`ah is an act of worship that is intended for its own sake, or is the reason for it that he should clean himself for this day?
The purpose is to clean himself [for that day], because the Messenger (blessings and peace of Allah be upon him) said: “You should purify yourselves for this day of yours.” So the purpose of this Ghusl is to make sure that one is clean for Friday, and this can be achieved by doing Ghusl for Janabah. Based on that, if someone does Ghusl for Janabah on Friday, it also includes Ghusl for Jumu`ah, even if he did not actually intend that. But if he does intend it, then the matter is clear." (Majmu` Fatawa wa Rasa’il Ibn `Uthaymin, 14/299-302)
Thus it becomes clear that this guideline forms the basis for working out these issues, in accordance with how the scholars understood the text and what they think the most likely interpretation of it is, and in accordance with the basic principles of Shari`ah and what has been decided as to whether an act of worship is intended for its own sake or is connected to another act of worship. Hence the Hanafis clarify this issue by stating that overlapping [of acts of worship] is only valid with regard to the conditions stipulated for acts of worship, such as purification, for example. In their view, it is permissible to have an overlap and combine intentions, such as if someone intends to purify himself from Janabah and also do Ghusl for Jumu`ah with one Ghusl.
With regard to the objectives, in the case of an act of worship that is intended for its own sake, it is not valid to have two overlapping intentions for it, such as if a person intends to offer the current obligatory prayer and also to make up a missed prayer in four Rak`ahs. This is not valid.
Ibn Rajab Al-Hanbali (may Allah have mercy on him) said:
“If two acts of worship of the same type are to be done at the same time, neither of which is being done by way of making up something that has been missed, and neither is connected to the other and is to be done at the same time, then their intentions may overlap, and one action may be done to cover both of them.
This is of two types:

The first type is when doing one action to cover two acts of worship together. In this case it is stipulated that the worshipper should intend both of them together, according to the well-known view.

For example, when someone is in a state of both minor and major impurity, the correct view is that it is sufficient for him to do the actions of major purification [Ghusl], provided that he intends thereby to do both types of purification…
He [Ibn Rajab] discussed other details that stem from this issue, and the rulings thereon according to the [Hanbali] Madhhab, then he said:

The second type is: when intending to do one of the two acts of worship, the other one will be waived. There are several examples of that, such as:

If he enters the mosque and the Iqamah for the prayer has already been given, so he prays with them. In this case, the prayer to greet the mosque is waived…
If a pilgrim who wants to perform `Umrah comes to Makkah and starts with the Tawaf of `Umrah, then Tawaf Al-Qudum [the arrival Tawaf] is waived in his case…” (See: Qawa`id Ibn Rajab (1/142 ff)
The jurists of the different Madhhabs discussed further details regarding the guidelines on what is valid in terms of overlapping intentions and what is not valid.
For more information, please see At-Tadakhul wa Atharuhu fil-Ahkam Ash-Shar`iyyah by Dr. Muhammad Khalid Mansur (p. 63 ff). This book is available [in Arabic] on the Internet.
And Allah knows best.