Maaser Sheni, Chapter Five, Mishnah Nine
This mishnah deals with how a person can set aside his tithes and give them to the rightful owners if his produce is at a distance from him. This would be necessary if the time for removal was drawing near and he needed to separate the tithes and give them away before that time passed.
1) One whose produce was far away from him, he must call it by name.
2) Once it happened that Rabban Gamaliel and the elders were traveling by ship, and Rabban Gamaliel said: The tithe which I shall measure out in the future is given to Joshua, and the place which it is in is leased to him. The other tithe which I shall measure out in the future is given to Akiva ben Joseph that he may hold it for the poor, and the place which it is in is leased to him.
3) Rabbi Joshua said: The tithe [taken from terumah] which I shall measure out is given to Elazar ben Azariah, and the place which it is in is leased to him, and they each received rent one from another.
Section one: A person can separate his tithes even if he is not near his produce. He doesnt need to be in close, physical contact with his produce in order to set aside the tithes and to transfer them to their proper owners. The mishnah now brings in the story of Rabban Gamaliel to illustrate exactly how this is done.
Section two: Rabban Gamaliel is traveling on a boat when the time to remove the tithes comes. He obviously cant get to the produce to physically set it aside, so what he does is declare that the tithe that he has in such and such a place is given to Rabbi Joshua, a Levi who was traveling with him. To Akiva ben Joseph, known to you and me as Rabbi Akiva, he gave the poor tithe, not because R. Akiva himself was poor, but because R. Akiva was the charity collector who gave out tithes to the poor.
Just allotting the tithes to Rabbi Joshua and Akiva was not sufficient. He also had to lease them the space where the tithes were located. This was a technique that he used so that they could acquire the tithes without actually taking them into their hands. Transactions involving produce cannot be done with mere statements, so in order to transfer to them the produce he also had to transfer to them, at least temporarily, the land on which the tithes were currently being stored. Rabbi Joshua and Akiva would then pay Rabban Gamaliel for the rental of the land (this is stated explicitly at the end of section three) and in this way, their land could acquire the produce found on it.
Section three: Now that Rabbi Joshua had received tithe from Rabban Gamaliel, he needed to transfer the terumat maaser (the terumah that the Levite gives to the priest) to Elazar ben Azariah, who is a priest. As above, he also rented him the place where the tithe was being held and then Elazar paid him the rent. In this way, everyone successfully separated their tithes and they could keep sailing on their ship, without worrying about their tithes.