Maaser Sheni, Chapter Three, Mishnah Three
This mishnah deals with a person who has maaser sheni money in Jerusalem, but doesnt want to use it to buy food or other things that one can buy with maaser sheni money.
1) One who has [second tithe] money in Jerusalem and he needs [to spend] it, and his friend had [non-sacred] produce, he may say to his friend: Let this money be exchanged for your produce.
2) It turns out that the one [must] eat his produce in purity and the other may do what he needs with his money.
3) But he may not say thus to an am haaretz except when [the money was] from [second tithe of] demai.
Section one: He may redeem his money by transferring its sanctity onto his friends non-sacred produce. The only real difference between this case and a normal case of buying produce with maaser sheni money is that here his friend did not want to sell the produce and the purchaser didnt want to buy it. There has been only a fictional transaction herethe only thing that has been transferred is the sanctity.
Section two: Now that the sanctity of the maaser sheni money has been transferred to the produce, the one with the produce has to make sure that he is pure when he eats it. The person with the money can now use the money to buy anything he wants, because its sanctity has transferred to the produce.
Section three: A person should not make this type of deal with an am haaretz, a person who is not scrupulous about observing the laws of purity. The am haaretz might eat the maaser sheni in a state of impurity, which is prohibited.
However, if the maaser sheni came from demai, then he can make this fictional exchange even with an am haaretz. An am haaretz is suspected of not separating tithes. When a person buys produce from an am haaretz he must tithe the produce because we are concerned that it hasnt been tithed. This tithe is called demaihopefully you remember this concept because there was a whole tractate dedicate to the subject. The rules are generally more lenient with demai, because if the am haaretz had tithed, there would have been no need to separate another tithe.
Returning to our case, if one has maaser sheni money whose origin is in demai, he can transfer its sanctity onto an am haaretzs non-sacred produce.