You are reading a tafsir for the group of verses 40:28 to 40:31

In verse 28, it was said: يَكْتُمُ إِيمَانَهُ (who had kept his faith secret). This tells us that a person who does not declare his 'iman (faith) before people, yet remains staunch in his faith by heart, then, this person is a believer. But, it stands proved from clear textual authority (of the Qur'an and Hadith) that, for 'iman to be acceptable, the simple certitude of the heart is not enough, instead, it is subject to the condition of a verbal confession and declaration. Unless the person concerned declares it verbally, he or she will not be regarded as a believer. However, making this verbal declaration before people publicly is not necessary. The only reason why it is needed is that unless people come to know about the person's 'iman, they would remain unable to interact with him or her in the same way as they do with Muslims. (Qurtubi)

Earlier in the verse, by saying: مُّؤْمِنٌ مِّنْ آلِ فِرْ‌عَوْنَ (a believing man from the House of the Pharaoh), it is virtually demonstrated that the believer, in his ensuing dialogue with Pharaoh and his people, invited them toward truth and faith as well as restrained them from killing Sayyidna Musa (علیہ السلام) .