ONE WHO DOES NOT KNOW FROM WHOM HE BOUGHT [Chiyuv:Safek:purchase]
Gemara
(Mishnah #1): If Reuven told two people 'I stole from one of you. I don't know from which', or 'one of your fathers deposited money with me. I don't know which', he pays both, because he admitted by himself.
Contradiction (Mishnah #2 - R. Tarfon): If Reuven stole from one of five people, he does not know from which; all of them say 'you stole from me', Reuven leaves in front of them what he stole and goes away.
Suggestion: The Tana of Mishnah #1 is not R. Tarfon.
(Yevamos 118b (Seifa of Mishnah #1 - R. Akiva): To clear himself from sin, he must pay the amount stolen to each one.)
Rejection (Beraisa): R. Tarfon admits that if one tells two 'I do not know from which of you I stole', that he pays both.
Answer: In Mishnah #2, they claim from him. Letter of the law, he leaves in front of them what he stole and withdraws. In Mishnah #1, he wants to fulfill his obligation b'Yedei Shomayim, he pays each.
(Mishnah): He leaves in front of them what he stole and withdraws.
Question: Will they divide it and walk away?! R. Aba bar Zavda taught that one does not take any Metzi'ah that is Safek Hinu'ach (perhaps it was left intentionally). If he took it, he does not return it!
Answer (Rav Safra): The Mishnah means, he leaves what he stole (until Eliyahu comes or one brings proof or the others admit).
Bava Kama 103b (Beraisa - R. Shimon ben Elazar): R. Tarfon and R. Akiva agree that if he bought from one of five people (without paying), he hands over the money and withdraws. They argue about when he stole. R. Tarfon says that he pays once. R. Akiva says that he pays to each.
Inference: R. Shimon ben Elazar says that they do not argue about buying. We infer that the first Tana in the Beraisa says that they argue!
(Beraisa): A case occurred in which a Chasid was unsure from which of two men he bought. R. Tarfon said ' it suffices to leave the money in front of them.' R. Akiva said 'to clear yourself you must pay each of them.'
Rishonim
Rif and Rosh (Yevamos 44a and 15:11): We establish the Mishnah like R. Shimon ben Elazar: all agree that if he bought from one of five, he hands over the money and withdraws. They argue about when he stole. R. Tarfon says that he pays once. R. Akiva says that he pays to each.
Rif (Bava Metzia 20b): He pays all to be Yotzei Yedei Shomayim. Letter of the law he needs to pay only once. The Halachah is that if one is unsure whether or not he owes Ploni, he is exempt, like Rav Nachman. All agree that one who bought from one of five need not pay all. They argue about one who transgressed or was negligent with a deposit.
Milchamos Hash-m: The Tana before R. Shimon ben Elazar holds that R. Akiva obligates even a buyer to pay each one, even though he not be careful to note from whom he buys. The Rif says to give the money to Beis Din; perhaps they can clarify the matter. If they cannot, it stays in his Reshus until Eliyahu comes.
Note: Also the Magid Mishneh says that the Rif says to leave the money in Beis Din. Our text of the Rif says 'between them.'
Rambam (Hilchos Mechirah 20:2): If one bought from one of five and each of them claims from him, and he is unsure, he hands over the money and withdraws. The money stays there until they admit or until Eliyahu comes. A Chasid pays each one to be Yotzei Yedei Shomayim.
Rambam (Hilchos She'alah 5:4): If Reuven and David deposited different amounts with Moshe and each claims the larger and Moshe is unsure, each of them swears that he gave the larger. Moshe gives the larger amount to each of them and suffers the loss, for he was negligent. He should have written the names on each deposit. If they deposited together in the same bundle Moshe pays the smaller amount to each and holds the rest until one of them admits.
Kesef Mishneh: He learns from Bava Metzia. To be Yotzei Yedei Shomayim, one must pay each, even regarding a deposit.
Lechem Mishneh: Tosfos (37a DH Gozal) says that Rav Nachman's law is independent of the argument of R. Akiva and R. Tarfon. The Rif disagrees. According to to the Tana that they argue even about a buyer, Rav Nachman is like R. Tarfon and Rav Yehudah is like R. Akiva. If so, how could the Gemara (Bava Metzia 37b) try to refute these Amora'im? We must say that it only suggested that a Stam Mishnah opposes each of them.
Tosfos (Bava Kama 104a DH she'Chevar): Surely, the Chasid wanted to be Yotzei Yedei Shomayim. Why did R. Tarfon tell him that he need not pay both? We must say that first he asked what is letter of the law. Alternatively, even b'Yedei Shomayim R. Tarfon requires paying each only if he transgressed. Bava Metzia 37a supports this. It distinguishes whether or not one seeks to be Yotzei Yedei Shomayim regarding theft, but not regarding a purchase.
Poskim
Shulchan Aruch (CM 222:2): If one does not know from which of five he bought and each claims from him, he hands over the money between them and leaves. Beis Din holds it until they admit or until Eliyahu comes.
Rebuttal (Shach 5): The Shulchan Aruch was swayed by the Magid Mishneh, who says that the Rambam means that the money is left in Beis Din. This is difficult. Regarding a Shomer the Rambam and Shulchan Aruch (300:1) explicitly say that it is left with him. Rashi, the Ba'al ha'Ma'or and Ramban all say so explicitly about a thief, and surely the same applies here.
Nesivos ha'Mishpat (Bi'urim 76:5): The Shach says the same about one who borrowed from two and is unsure who lent the larger amount. It seems that all agree about a loan. If he would give the money to Beis Din and it was lost he would still be liable to the lender (if the lender brought proof). Regarding a deposit or theft, once he gives it to Beis Din he is exempt.
Shulchan Aruch: A Chasid pays each to be Yotzei Yedei Shomayim.
SMA (6): If they do not claim from him, he need not pay them even to be Yotzei Yedei Shomayim.
Note: The Shulchan Aruch (300:3) says so about a Nifkad. It brings two opinions about whether one must pay to be Yotzei Yedei Shomayim if he is unsure from whom he borrowed and they do not claim from him (76:3).
Shach (3): We do not distinguish whether they claimed from him even before he admitted, only whether or not they are sure.
Question: The buyer is negligent for forgetting from whom he took. He should need to pay each, like one who took a deposit!
Answers (Ramban Bava Metzia 37b DH v'Iy): Normally, a buyer pays immediately. He did not need to suspect that another would have the audacity to claim that he sold it. Alternatively, the sellers were together, yet they did not tell him to note from whom he buys. It was reasonable for him to assume that they trusted each other or they were partners, so he pays only once and is Yotzei Yedei Shomayim. Regarding a buyer, the Halachah follows R. Tarfon. He told the Chasid that he need pay only once, even though surely he wanted to be Yotzei Yedei Shomayim.
Bach (DH Ela): 'He bought from one of five' connotes that the sellers were together. A Nifkad need not be careful to label deposits that people gave together; the same applies here. The Gemara compares a buyer to a thief. We cannot say that a thief should have remembered. The only difference is that he sinned.
Rebuttal (Shach 4): The Rif, Rambam and Shulchan Aruch do not exempt a Nifkad if depositors were together at the time, unless they gave one bundle! Rather, one must suspect lest a depositor claim the bigger amount, but one need not suspect that one who sold nothing will claim that he sold. The Nimukei Yosef says that only a Nifkad must be careful, for people deposit for a long time (like the Ramban's first answer). According to this, even if the sellers were not together the buyer pays only once.
Nesivos ha'Mishpat (Chidushim 5): According to the Nimukei Yosef, if he bought on credit this is like a deposit.
Question (Shach 6): Regarding a (blameless) Nifkad, the Shulchan Aruch does not require paying each to be Yotzei Yedei Shomayim! Perhaps the Shulchan Aruch distinguishes a buyer from a Nifkad. However, it explains that the buyer is blameless!
Answer (Ketzos ha'Choshen 5): Often the Shulchan Aruch teaches liability b'Yedei Shomayim. He teaches that a Chasid must pay each to be Yotzei Yedei Shomayim; others need not.
Gra (3): The Halachah follows R. Akiva (a buyer must pay everyone to be Yotzei Yedei Shomayim).