Whoever wants the Worldly Life, then He will have no Share of the Hereafter
Al-`Awfi reported that Ibn `Abbas said concerning this verse, "Verily those who show off, will be given their reward for their good deeds in this life. This will be so that they are not wronged, even the amount equivalent to the size of the speck on a date-stone." Ibn `Abbas continued saying, "Therefore, whoever does a good deed seeking to acquire worldly gain - like fasting, prayer, or standing for prayer at night - and he does so in order to acquire worldly benefit, then Allah says, `Give him the reward of that which he sought in the worldly life,' and his deed that he did is wasted because he was only seeking the life of this world. In the Hereafter he will be of the losers." A similar narration has been reported from Mujahid, Ad-Dahhak and many others. Anas bin Malik and Al-Hasan both said, "This verse was revealed concerning the Jews and the Christians." Mujahid and others said, "This verse was revealed concerning the people who perform deeds to be seen." Qatadah said, "Whoever's concern, intention and goal is this worldly life, then Allah will reward him for his good deeds in this life. Then, when reaches the next life, he will not have any good deeds that will be rewarded. However, concerning the believer, he will be rewarded for his good deeds in this life and in the Hereafter as well." Allah, the Exalted, says,
The second verse (17) presents the high ground the Holy Prophet ﷺ and the purely sincere believers with him occupy. This is in sharp contrast to those the sum total of whose knowledge and the end of whose quest is restricted to worldly life only - so that the whole world could see that these two groups could not be equal. After having focused on this phenomena, it has been stated that the mission and message of the Holy Prophet ﷺ as a prophet and messenger of Allah is open to mankind right through the Last Day of Qiyamah. Then, it has been stressed that anyone who does not believe in him will be considered, irrespective of what one does, astray and Hell-bound.
In the first sentence, it was asked: Can a denier of the Qur'an be equal to the one who adheres to the Qur'an that has come from his Lord? And along with it there is a witness present within it, while a witness earlier to this is the Book of Musa A.L that was sent to be followed and to be mercy for people?
Tazkirul Quran
Maulana Wahiduddin Khan
There are two kinds of religion—one adulterated and the other unadulterated. The former, although a compromise between religion and worldliness, displays the label of religion. This is why in every period big institutions come into existence on its basis and through them, people with vested interests receive worldly benefits in the name of ‘religion’. The case of unadulterated religion is just the opposite. When its call goes out, it is to project a purely theoretical Truth; it is not surrounded by economic interests and leadership considerations. This being so, when the call of unadulterated religion reaches those who have attained a high status and great respect in the name of adulterated religion, they are horrified, because they feel that, on adopting it, they will lose all their worldly benefits. People often engage themselves in worldly activities in the name of religion. The call of pure religion among such people amounts to exposing them for what they really are. The call of truth is, in fact, a subtle test paper for its addressees. Now the very people who were engaged in activities in the name of religion resist the call of truth. Their resistance to the divine message shows that their ‘religious’ observances were, in fact, interest-oriented worldly activities. Had they been sincere in their service to religion, they would have lost no time in recognizing the Truth in its unadulterated form. The call of Truth thus serves as a discriminator between sincere and insincere people. The sincere are ready to make any sacrifice for the true cause of religion. But the insincere favour only that religion which ensures the safety of their worldly gains. They cannot even contemplate losing their material assets. They want to spend their time and energy only on those religious activities which bring them fame, honour and all other worldly benefits. Obviously such efforts cannot bear fruit in the Hereafter.
Uthmani text of the Madinah mushaf (King Fahd Complex). Translation: Saheeh International. Tafsir via Quran.com.