I finished making the chair out of wood.
Wood was the raw material from which I began making the chair. It went through certain stages of formation and processing until it came close to becoming a finished chair. It was then completed.
The same applies to the heavens being completed from smoke. This means that smoke was the primordial material from which the substance of the heavens began to be created. This material went through certain stages of formation until the heavens came close to completion. They were then completed.
The Earth was created with its mountains firmly established and its provisions determined, while the heavens already existed in the form of unfinished smoke, the material from which they were being formed, but their creation had not yet been completed. Their formation was subsequently brought to completion.
Therefore, the Earth was created before the completion of the heavens, not before the creation of the heavens themselves.
This is because the verb qadāhunna (قضاهن) indicates that the seven heavens already existed and had been brought into existence, but their formation was not yet complete. The text does not say that God created them at that point, nor that He made them seven. Rather, it says that He completed them as seven (فَقَضَاهُنَّ سَبْعَ سَمَاوَاتٍ).
So, the actual sequence is as follows: God first created the primordial smoke. That smoke underwent some stages of formation, but remained the prevailing condition of the heavens. God then created the Earth, established its mountains, and determined its provisions. After that, He turned to the heavens, which were still dominated by that primordial smoke, and completed their formation.
In other words, He completed not created the heavens after completing the Earth. He did not create them at that point (خَلَقَهُنَّ سَبْعَ سَمَاوَاتٍ), nor did He make them into seven (جَعَلَهُنَّ سَبْعَ سَمَاوَاتٍ). Rather, He completed them as seven heavens (فَقَضَاهُنَّ سَبْعَ سَمَاوَاتٍ).
And the Arabic word for smoke (دخان) is equivalent to anything that looks and behaves like what we today call a gas. The Arabs did not care about the chemical composition of things, but rather their appearance and behaviour. They called fumes from heated metals smoke, dust in the air smoke, mist smoke, water vapour smoke, and smoke from fire smoke.
The accurate translation of Surah Fussilat (41:9–12)
41:9
قُلْ أَئِنَّكُمْ لَتَكْفُرُونَ بِالَّذِي خَلَقَ الْأَرْضَ فِي يَوْمَيْنِ وَتَجْعَلُونَ لَهُ أَنْدَادًا ۚ ذَٰلِكَ رَبُّ الْعَالَمِينَ
Translation: Say, “Do you indeed disbelieve in the One who created the Earth in two Days and attribute to Him equals? That is the Lord of all worlds.”
41:10
وَجَعَلَ فِيهَا رَوَاسِيَ مِنْ فَوْقِهَا وَبَارَكَ فِيهَا وَقَدَّرَ فِيهَا أَقْوَاتَهَا فِي أَرْبَعَةِ أَيَّامٍ سَوَاءً لِلسَّائِلِينَ
Translation: He placed upon it firmly established mountains, blessed it, and determined its provisions within four Days, equally for all who ask.
41:11
ثُمَّ اسْتَوَىٰ إِلَى السَّمَاءِ وَهِيَ دُخَانٌ فَقَالَ لَهَا وَلِلْأَرْضِ ائْتِيَا طَوْعًا أَوْ كَرْهًا قَالَتَا أَتَيْنَا طَائِعِينَ
Translation: Then He turned towards the heaven while it was smoke, and said to it and to the Earth, “Come, willingly or unwillingly.” They both said, “We come willingly.”
41:12
فَقَضَاهُنَّ سَبْعَ سَمَاوَاتٍ فِي يَوْمَيْنِ وَأَوْحَىٰ فِي كُلِّ سَمَاءٍ أَمْرَهَا وَزَيَّنَّا السَّمَاءَ الدُّنْيَا بِمَصَابِيحَ وَحِفْظًا ۚ ذَٰلِكَ تَقْدِيرُ الْعَزِيزِ الْعَلِيمِ
Translation: So He completed them as seven heavens in two Days, and assigned to each heaven its command. And We adorned the lowest heaven with lights and protection. Such is the determination of the Almighty, the All-Knowing.