TT #80 · Parshas Vayeira · Passuk 21:1
And Hashem visited Sarah as He had said, and Hashem did for Sarah as He had spoken.
Torah Temimah points to Bava Kamma 92a. E-Daf · Sefaria — Bava Kamma 92a
TT lemma: כאשר אמר.
“As He had said.” Rava said to Rabbah bar Mari: From where is the matter that the Sages said, “Whoever seeks mercy for his fellow when he himself needs that same thing is answered first”? As it is written, “And Avraham prayed [for Avimelech],” and immediately afterward, “And Hashem visited Sarah as He had said”—as Avraham had said concerning Avimelech.
Category C — Contextual / literary / narrative method.
Method — The Gemara derives that one who prays for another person’s need, while needing the same thing himself, is answered first. The sequence places Avraham’s prayer for Avimelech immediately before Sarah’s conception.
Textual trigger — Avraham’s prayer in Bereishis 20:17 followed by “va-Hashem pakad et Sarah” in Bereishis 21:1; the phrase “ka-asher amar” is read as referring to what Avraham had said in his prayer for Avimelech.
One who prays for his fellow when he himself needs the same thing is answered first; Avraham prayed for Avimelech and was immediately answered for Sarah.