The clear intent of this is to be a completion of what the magicians admonished Fir`awn with. They warned him of the vengeance of Allah and His eternal and everlasting punishment. They also encouraged him to seek Allah's eternal and endless reward. They said,
إِنَّهُ مَن يَأْتِ رَبَّهُ مُجْرِماً
(Verily, whoever comes to his Lord as a criminal,) This means, whoever meets Allah on the Day of Judgment while being a criminal.
Surely whoever comes to his Lord as a sinner, for him there is Jahannam .:.. And whoever comes to Him as a believer ... for such people there are the highest ranks.... (20:74-76)
These words which refer to the Islamic beliefs and the hereafter have been spoken by the magician who only recently became Muslims and who had not yet been instructed about the principles and the obligations of the new faith.
It was the result of their brief association with Sayyidna Musa (علیہ السلام) that Allah, in an instant, revealed to them the mysteries of their new faith so that they gave scarce heed to Pharaoh's threats. Thus with the adoption of the religion of Allah they attained a state of sainthood which is given to others after long and assiduous exertions. Sayyidna Ibn ` Abbas and ` Ubaid Ibn ` Umair ؓ said it was a divine marvel that the magicians who started the day as infidels became saints before it ended. (Ibn Kathir)
Tazkirul Quran
Maulana Wahiduddin KhanOn ayahs 73–75
The magicians, on the one hand, were confronted by the cogent reasoning of Moses, and on the other, the towering personality of Pharaoh. The magicians preferred convincing arguments to authoritarianism, although they knew very well how dearly they would pay for their choice. The magicians’ faith was not of the hereditary or formal, ritual kind: it amounted to a ‘discovery’ for them. And faith received as a discovery is so powerful that under its influence everything else appears worthless—be it a great personality or some other worldly consideration.
Uthmani text of the Madinah mushaf (King Fahd Complex). Translation: Saheeh International. Tafsir via Quran.com.