ואם לקח בשוגג יחזרו דמים למקומם במזיד תעלה ותאכל במקום אמר רבי יהודה במה דברים אמורים במתכוין ולקח תחילה לשם שלמים אבל במתכוין להוציא מעות מעשר שני לחולין בין שוגג בין מזיד יחזרו דמים למקומם
and if one purchased an animal unwittingly, without realizing he was using second tithe money, the money returns to its place, meaning that it is considered to be an erroneous transaction and is void, because the purchaser would prefer to bring the second tithe money to Jerusalem rather than to travel with an animal to bring as an offering. If he purchased it intentionally, the animal is brought up and eaten in its proper place, i.e., in Jerusalem. Rabbi Yehuda said: In what case is this statement said? It is said with regard to one who acted with intent, and purchased the animal from the outset for the sake of a peace-offering, and in any case had to bring the animal to Jerusalem. But with regard to one who acted with intent to withdraw the second-tithe money from its consecrated state to a desacralized state, whether his act was unwitting, in which case it is an erroneous transaction, or intentional, the money returns to its place.
והאנן תנן רבי יהודה אומר במזיד קידש אמר רבי אלעזר אשה יודעת שאין מעות מעשר שני מתחללין על ידה ועולה ואוכלתו בירושלים
The Gemara questions this statement: But didn’t we learn in the mishna that Rabbi Yehuda says: If the second tithe was used intentionally, he has betrothed the woman with it, and the betrothal, which is a type of acquisition, is effective? Rabbi Elazar said: The halakha in the mishna is based upon the assumption that a woman knows that second-tithe money is not desacralized by her acceptance of the betrothal, and it is as though she has agreed that she would ascend and eat it in Jerusalem.
מתקיף לה ר' ירמיה והרי בהמה טמאה עבדים וקרקעות דאדם יודע שאין מעות מעשר שני מתחללין עליהן ותנן אין לוקחים בהמה טמאה עבדים וקרקעו' במעות מעשר שני אפי' בירושלים ואם לקח יאכל כנגדן
Rabbi Yirmeya objects to this: But there are cases of a non-kosher animal, slaves, or land, with regard to which a person knows that second-tithe money is not desacralized by being used to purchase them, and we learned in a mishna (Ma’aser Sheni 1:7): One may not purchase a non-kosher animal, slaves, or land with second-tithe money, even in Jerusalem. And if one did purchase them, he must eat other food corresponding to their value. He must take an equivalent sum of money and use it to desacralize the money in the seller’s possession, after which he proceeds to bring this money to Jerusalem and use it to buy food, which he will then consume. In this case, the seller is also presumably aware that the money is second tithe and that he himself will need to take it to Jerusalem, as was presumed in the case of the betrothed woman, so why is the halakha not the same?
אלא הכא באשה חבירה עסקינן דידעה
Rather, it must be that here, in the case of the mishna, we are dealing with a woman devoted to the meticulous observance of mitzvot, especially the halakhot of ritual purity, teruma, and tithes [ḥavera], who knows the laws of tithes, and accepts it for betrothal with the awareness that she must take it to Jerusalem. An ordinary person, however, is not well-versed in these halakhot, so in the case of the purchase of an animal the seller thinks that the second-tithe money has been desacralized through the purchase of the non-kosher animal.
אמר מר אם לקח יאכל כנגדן ואמאי יחזרו דמיו למקומם כי התם
The Master said: If one did purchase them, he must eat other food corresponding to their value. The Gemara asks: But why should he do so? Why not say that the money must return to its place, just as was the ruling there, as Rabbi Yehuda said with regard to one who acted with intent to desacralize the second tithe, where the seller was penalized for acquiescing to the sale?