The Messenger of Allah ﷺ said, "We have more right to doubt than Ibrahim did when he said, 'My Lord, show me how You give life to the dead.' He said, 'Do you not believe?' He said, 'Yes, but only that my heart may be at peace' [Baqarah 2:260]. And may Allah have mercy on Lut, for he sought refuge in a mighty support. And had I stayed in prison as long as Yusuf stayed, I would have answered the one who summoned me."
أن رسول الله ﷺ قال: نحن أحق بالشك من إبراهيم إذ قال{رب أرني كيف تحي الموتى قال أولم تؤمن قال بلى ولكن ليطمين قلبى} ويرحم الله لوطا لقد كان يأوي إلى ركن شديد ولو لبثت في السجن طول ما لبث يوسف لأجبت الداعي.
Bukhari related it in the chapters on the Prophets (3372), and Muslim in the Book of Faith (151:238), both through Abdullah bin Wahb, who said, Yunus informed me, from Ibn Shihab, from Abu Salama bin Abdul-Rahman and Saeed bin Musayab, from Abu Hurairah, and he recounted it.The meaning of his statement, "I would have answered the summoner," refers to the messenger sent by the king mentioned in the verse, "So when the messenger came to him, he said, 'Go back to your lord and ask him about the women who cut their hands. Indeed, my Lord is fully aware of their scheme'" [Yusuf 12:50].As for his statement, "and we are more deserving of doubt than Ibrahim," its purpose is to negate doubt from Ibrahim and affirm the strength of his faith, by attributing the doubt to himself, when in fact he is free of doubt ﷺ without question.