Kaab swore to him by Allah, the One who split the sea for Musa, "We find in the Torah that Dawud, the prophet of Allah ﷺ, when he finished his prayer, would say, 'O Allah, set right for me my religion, which You have made the safeguard of my affairs. Set right for me my worldly life, in which You have placed my livelihood. O Allah, I seek refuge in Your pleasure from Your wrath, and I seek refuge in Your pardon from Your punishment, and I seek refuge in You from You. None can withhold what You grant, and none can grant what You withhold, and no fortune can avail its possessor against You.'"He said, Kaab also told me that Suhayb related to him that Muhammad ﷺ used to say these words when he finished his prayer.
أخبرنا عمرو بن سواد بن الأسود بن عمرو قال حدثنا ابن وهب قال أخبرني حفص بن ميسرة عن موسى بن عقبة
أن كعبا حلف له بالله الذي فلق البحر لموسى إنا لنجد في التوراة أن داود نبي الله ﷺ كان إذا انصرف من صلاته قال اللهم أصلح لي ديني الذي جعلته لي عصمة وأصلح لي دنياي التي جعلت فيها معاشي اللهم إني أعوذ برضاك من سخطك وأعوذ بعفوك من نقمتك وأعوذ بك منك لا مانع لما أعطيت ولا معطي لما منعت ولا ينفع ذا الجد منك الجد قال وحدثني كعب أن صهيبا حدثه أن محمدا ﷺ كان يقولهن عند انصرافه من صلاته
[Its isnad is hasan] Ibn Khuzayma narrated it in his Sahih, no. 745, from the hadith of Abdullah bin Wahb, through the same chain, and it also appears in Kubra, no. 1269. Ibn Hibban graded it sahih, no. 541, and it has supporting narrations. Kaab Ahbar's hadith is hasan, and the rest of the chain is sahih.