A Muslim is required to seek Allah’s pleasure by means of devoting his intention to Him alone. Sincerity is the essence of having one’s deeds accepted, provided that they don’t conflict with Shari `ah. As for having double intention in optional fast and prayer, it’s permissible, if not recommended, to increase one’s rewards by such good deeds.
The permanent committee of the Assemblyof Muslim Jurists in America (AMJA) stated that: It is permissible to have double intention in this case, as intentions are said by scholars to be a sort of trade. Suppose a Muslim fasts on Monday or Thursday which are of the days that Prophet Muhammad (peace and blessings be upon him) used to fast as he (Prophet Muhammad) said, “The deeds of people would be presented on Mondays and Thursdays, and I like to have my deeds presented to Allah while I am fasting” (At-Tirmidhi). It would happen that the day (Monday or Thursday) was coincidentally one of the white days (13th, 14th, and 15th of every Hijri month) that Prophet Muhammad used to fast, it is permissible then for a Muslim to combine both intentions for fasting that day.
Another example that is permissible is when a Muslim goes into a mosque and performs a two rak`ahs of prayer as a greeting for the mosque and intends them coincidentally to be as Istikharah (prayer for guidance).
The rule on that issue depends on the Prophet’s saying “Deeds (their correctness and rewards) depend upon intentions, and every person gets but what he has intended” (Al-Bukhari and Muslim).