Page 85
wa-mādhā ʿalayhim law ʾāmanū bi-llāhi wa-l-yawmi l-ʾākhiri wa-ʾanfaqū mimmā razaqahumu llāhu wa-kāna llāhu bihim ʿalīman
What harm would it have done them had they believed in Allah and the Last Day, and spent out of what Allah has provided them? Allah knows them well.
— Ali Quli Qarai
Surah An-Nisa', Verse 39
39. "And what (harm) would it have done them if they had believed in Allah and the Last Day, and spent in charity of what Allah had provided them with? And Allah is ever aware of them."
In this verse, as an expression of sympathy and regret for the state of this group, it says that what would happen to them if they returned from this deviated-path and believed in Allah and the Last Day? They could also spend a part of the bounties that Allah had given them to the servants of Allah with a sincere intention and through a pure thought. By this way, they would earn the felicity and happiness of this world and the next world both.
However, Allah is aware of their intentions and deeds, and He will give them an appropriate reward and retribution accordingly.