He narrated to them that the Prophet ﷺ judged between two men. When the one against whom the verdict was given turned to leave, he said, "Allah is sufficient for me, and what an excellent guardian He is."The Prophet ﷺ said, "Allah blames helplessness, but you must take to shrewdness. When a matter overwhelms you, then say, 'Allah is sufficient for me, and what an excellent guardian He is.'"
حدثنا عبد الوهاب بن نجدة وموسى بن مروان الرقي قالا حدثنا بقية بن الوليد عن بحير بن سعد عن خالد بن معدان عن سيف
أنه حدثهم أن النبي ﷺ قضى بين رجلين فقال المقضي عليه لما أدبر حسبي الله ونعم الوكيل فقال النبي ﷺ إن الله يلوم على العجز ولكن عليك بالكيس فإذا غلبك أمر فقل حسبي الله ونعم الوكيل
[Its chain of transmission is daif] Ahmad reported it in 6/24, 25 from the hadith of Baqiyyah with the same wording. He explicitly stated that he heard it, but he did not explicitly state that the whole chain heard it in succession. Nasai said in al-Kubra, no. 10462, and in Amal al-Yawm wal-Layla, no. 626, "Sayf, I do not know him."