Ka'b swore to him: "By Allah (SWT) Who parted the sea for Musa, we find in the Tawrah that when Dawud, the Prophet of Allah, finished his prayer, he would say: 'Allahumma Aslih li dinya-lladhi ja'altahu li ismatan wa aslih li dunyaya-llati ja'alta fiha ma'ashi, Allahumma inni a-udhu biridaka min sakhatik wa a-udhu bi'afwika min naqmatika wa a-udhu bika mink, la mani' lima a'taita wa la mu'tia lima mana'ta wa la yanfa'u dhal-jaddi minka al-jadd (O Allah, set straight my religious commitment that You have made a protection for me, and set straight my worldly affairs which You have made a means of my livelihood. O Allah, I seek refuge in Your pleasure from Your wrath, and I seek refuge in Your forgiveness from Your punishment, and I seek refuge in You from You. None can withhold what you have given and none can give what you have withheld, and no wealth or fortune can avail the man of wealth and fortune before You.)'" He said: "And Ka'b told me that Suhaib told him that Muhammad ﷺ used to say (these words) when he had finished praying.'" (Using translation from Nasāʾī 1346)
أَنَّ كَعْبًا حَلَفَ لَهُ بِاللهِ الَّذِي فَلَقَ الْبَحْرَ لِمُوسَى إِنَّا نَجْدُ فِي التَّوْرَاةِ أَنَّ دَاوُدَ نَبِيَّ اللهِ كَانَ إِذَا انْصَرَفَ مِنْ صَلَاتِهِ قَالَ «اللهُمَّ أَصْلِحْ لِي دِينِي الَّذِي جَعَلْتُهُ لِي عِصْمَةً وَأَصْلَحَ لِي دُنْيَايَ الَّتِي جَعَلْتَ فِيهَا مَعَاشِي اللهُمَّ إِنِّي أَعُوذُ بِرِضَاكَ مِنْ سَخَطِكَ وَأَعُوذُ يَعْنِي بِعَفْوِكَ مِنْ نِقْمَتِكَ وَأَعُوذُ بِكَ مِنْكَ لَا مَانِعَ لِمَا أَعْطَيْتَ وَلَا مُعْطِيَ لِمَا مَنَعْتَ وَلَا يَنْفَعُ ذَا الْجَدِّ مِنْكَ الْجَدُّ» قَالَ وَحَدَّثَنِي كَعْبٌ أَنَّ صُهَيْبًا حَدَّثَهُ أَنَّ مُحَمَّدًا ﷺ كَانَ يَقُولُهُنَّ عِنْدَ انْصِرَافِهِ مِنْ صَلَاتِهِ