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 displeasure, and 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 possessor of fortune benefits from his fortune against You.'"He said, Kaab told me that Suhayb related to him that Muhammad ﷺ used to say these words when he finished his prayer.
أن كعبا حلف له بالله الذي فلق البحر لموسى إنا لنجد في التوراة: أن داود نبي الله ﷺ، كان إذا انصرف من صلاته قال: اللهم أصلح لي ديني الذي جعلته لي عصمة، وأصلح لي دنياي التي جعلت فيها معاشي، اللهم إني أعوذ برضاك من سخطك، وأعوذ بعفوك من نقمتك، وأعوذ بك منك، لا مانع لما أعطيت، ولا معطي لما منعت ولا ينفع ذا الجد منك الجد، قال: وحدثني كعب، أن صهيبا حدثه، أن محمدا ﷺ كان يقولهن عند انصرافه من صلاته.
Nasai (1346) narrated it from Amr bin Sawad bin Aswad bin Amr, who said, Ibn Wahb told us, who said, Hafs bin Maysara informed me, from Musa bin Uqba, from Ataa bin Abu Marwan, from his father, and he related it.Ibn Khuzayma (745) and Ibn Hibban (2036) graded it sahih, both relating it through the route of Hafs bin Maysara in like manner.