Maaser Sheni, Chapter 3, Mishnah 4. In the previous mishnah we learned that a person who is holding maaser sheni coins in Jerusalem and needs them for ordinary purposes may transfer their sanctity onto his friend's produce: the produce takes on the status of maaser sheni and his friend eats it in purity, while the coins may then be used for whatever he needs.
Our mishnah adds two situations in which the coins and the produce are not in the same place:
"Peiros b'Yerushalayim u'maos ba'medinah" - his friend's produce, onto which he wishes to transfer the sanctity of maaser sheni, is in Jerusalem, while the maaser sheni coins that he wishes to use for purposes other than maaser sheni are in the provinces, outside Jerusalem. Even in such a case it can be done, and the wording of the redemption is: "Harei ha'maos hahem mechulalos al peiros eilu" - those coins are redeemed onto this produce, the produce that is here in Jerusalem.
"Maos b'Yerushalayim u'peiros ba'medinah" - the reverse situation: the maaser sheni coins are in Jerusalem and the produce is outside Jerusalem. Here too he may say the following: "Harei ha'maos eilu mechulalos al peiros hahem" - the maaser sheni coins in Jerusalem are redeemed onto that ordinary produce which is outside Jerusalem.
"U'vilvad she'yaalu ha'peiros v'yei'achlu b'Yerushalayim":
This allowance is granted on one condition: the produce onto which the coins were redeemed must be brought up to Jerusalem itself and eaten there. The owner may not redeem that same produce again onto money and bring the money up to Jerusalem. Once he takes maaser sheni coins and returns their sanctity onto produce, which is where that sanctity originally came from, he is obligated to bring the produce itself up to Jerusalem, and it is no longer subject to redemption.
In summary: in this mishnah we learned that redeeming maaser sheni coins onto produce is possible even when the coins and the produce are not in the same place, whether the produce is in Jerusalem and the coins in the provinces, or the coins are in Jerusalem and the produce in the provinces, provided that the produce is brought up to Jerusalem and eaten there, since it can no longer be redeemed.