Question 534: If I work during Dhuhr waqt and only finish work after 4pm when Asr’s waqt is in already. Do I pray Dhuhr at the first chance I get or do I first perform Asr and then Dhuhr or when should I make Dhuhr? I want to know about the Allocated time for offering Obligatory Prayers?
Answer 534: If a stick, a pole, or anything similar to it, which acts as an indicator (shakhis) is made to stand on a level ground, its shadow will fall westwards when the sun rises in the morning, and as the sun continues to rise the shadow cast by the indicator will reduce in size. And in our cities it becomes smallest at the time of the commencement of Zuhr. And as Zuhr passes the shadow cast by the indicator turns eastwards, and as the sun moves towards west the shadow gets longer. Based on this, when the shadow is the shortest, and it begins getting longer again, it is known that Zuhr has taken place. However, in other cities like in Mecca, the shadow disappears totally, so, when it reappears it indicates Zuhr.
The time for Zuhr and Asr prayers is from when the sun starts declining at midday till sunset. But, if a person intentionally offers Asr prayers earlier than Zuhr prayers, his prayer is void. However, if a person had not prayed Zuhr till the end of time, and the time left before Qadha allows only one Namaz to be prayed, he will first offer Asr prayers in time and then his Zuhr will be Qadha. And if before that time a person offers complete Asr prayers before Zuhr prayers by mistake, his prayer is valid. But as a recommended precaution, he should treat that Namaz as Zuhr and should offer 4 more Rak’ats of prayers with the intention of relieving oneself of responsibility, if any (Ala mafi zzimmah).
If a person begins offering Asr prayers forgetfully before Zuhr prayers and during the prayers he realises that he has committed a mistake, he should revert his Niyyat to Zuhr prayers i.e. he should intend that from now onwards till the end of the prayers, it would be Zuhr prayers. After completing the prayers, he will offer Asr prayers.
Therefore if one delays his Dhuhr prayer until the specific period of Asr prayer, the Dhuhr prayer wil be qadha, and he must perform the Asr prayer in that period, and compensate for his Dhuhr prayer later. 
As a result, you have to offer your Dhuhr prayer first and then Asr if you have enough time to offer the both Dhuhr and Asr prayers. Otherwise, if it is the specific period of Asr prayer (i.e. you can only offer four Rakaats before the sunset) you have to offer Asr prayer first and then offer Dhuhr prayer as Qadha (i.e. after the lapse of time).
If a person offers Asr prayer before Zuhr prayer, but there is ample time left for offering four Rak’ats, it would be valid to offer Zuhr prayer during that time as within the due time.
Likewise, if a person offers Zuhr prayer before midday under the impression that its due time has arrived, and then the due time arrives before its completion, there shall be no hindrance in offering the Asr prayer after finishing the prayer and it is not obligatory to delay it until the passage of time required for offering four Rak’ats. Rather if the entire Asr prayer is offered during the time of Zuhr prayers, according to the strong opinion, it would be valid, in the same way as when a person believes that he has offered Zuhr prayer and so offers the Asr prayer, but later it transpires that he had not offered (Zuhr prayer), though the entire Asr prayer had taken place during the time reserved for the Zuhr prayer. But caution must not be given up in case he could not find a part of the common time (Zuhr and Asr prayers).
For further information on prayer time, please refer to the following answer:
Index: Prayer Time: The Due Time for Obligatory Prayers, answer 199.
 . Tahrir al-Wasilah of Imam Khomeini, Vol. 1, Chapter on Preliminaries of Prayer.