“This point is subject to dispute, whether this is similar to tzedakah,” replied Rabbi Dayan. “The Mishnah [Pe’ah 5:4] teaches that a traveler who is out of funds can be fed from tzedakah, even though he has money at home. The Rambam, in his commentary to the Mishnah writes that he is only obligated to repay as a middas chassidus (pious act). The Shulchan Aruch [Y.D. 253:4] also writes that there is no legal obligation, but his language indicates there is a moral obligation.”
“Some suggest the same rule applies to our case; there is only a moral obligation,” continued Rabbi Dayan. “Rav S.Z. Auerbach, though, differentiates. The traveler is like a poor person who became wealthy later; he does not need to repay the charity he received in the past. However, here the rescued person becomes obligated to reimburse the one who saves him at the time he is saved – so he remains obligated to pay when he earns later.” (See Pischei Choshen, Nezikin 12:11; Nishmas Avraham C.M. 426:1[A]1).