"And those before them had plotted," meaning: before the polytheists of this nation. "But all power of plotting belongs to Allah," so He plotted against them and destroyed them while they were at their most active in their worldly affairs. "He knows what every soul earns," meaning: what it does. "And the disbelievers will know for whom is the final home," meaning: for whom is Paradise.
﴿وَقَدْ مَكَرَ الَّذِينَ مِنْ قَبْلِهِمْ﴾ يَعْنِي: مِنْ قَبْلِ مُشْرِكِي هَذِهِ الْأمة ﴿فَللَّه الْمَكْر جَمِيعًا﴾ فَمَكَرَ بِهِمْ، أَهْلَكَهُمْ أَحْسَنَ مَا كَانُوا فِي دُنْيَاهُمْ فِعَالا ﴿يَعْلَمُ مَا تكسب كل نفسٍ﴾ أَيْ: تَعْمَلُ ﴿وَسَيَعْلَمُ (الْكُفَّارُ﴾ لِمَنْ عُقبى الدَّار﴾ لمن الْجنَّة