Our building complex has much land which is unused. One of the neighbors, who is a sofer, decided to build a small apartment on some of the unused land where he would write. No one raised any objection because the property was anyway not in use and we were happy to help our neighbor earn a parnosso. After quite a few years, the neighbor moved away and no longer used the apartment to write. He began renting the property to an individual who used it as an apartment. The neighbors felt that now that the sofer is using the apartment to earn money, they should share in the income. The sofer understood their position but said that he paid all the construction costs and they should pay him back, which they agreed to do. How much of the rent money are the neighbors entitled to?
The basis to answer this question is a Gemara in Bovo Kama (21A). In order to understand the discussion it is necessary to introduce two related dinim.
The Gemara has a discussion and concludes that if a person derives benefit from another person’s possessions, the one who derives benefit is not obligated to pay for the benefit if the owner of the property did not suffer any loss. This is the psak in Choshen Mishpot (363, 6). This principle is known as ze nehene veze lo chosar, potur.
However, according to most Rishonim (ruled in C.M. 363, 7) if the owner suffers a loss – even a minor one – the one who derives benefit must pay for the entire value of the benefit he received. For example, if a person squatted in a vacant house which was not up for rent, he is not required to pay the owner any rent. However, if he sullied the walls he has to pay rent, according to most Rishonim.
The Gemara records an anecdote of someone who built a palace on a vacant lot owned by orphans. The Gemara writes that Rav Nachman made the builder pay rent for use of the palace since previously there were others who used the vacant lot and they paid a small amount to the orphans. The Rosh (2, 6) and Rabbeinu Yerucham (Meishorim 31, 2) explain that Rav Nachman made the builder pay for the benefit he derived from the land on which the palace was built, but he did not have to pay for the benefit from the palace because the orphans did not have a house and their loss was just the use of the land. Similarly, the Talmidei Horashbo Vehorosh writes that the orphans acquire the palace building only from when they pay for it.
However, the opinion of the Rashbo is that when the orphans pay for the property, they acquire the palace not from the time they paid for the palace but rather retroactively, from the time the palace was first built. The logic of the Rashbo is that when one builds on another person’s property he immediately gives the building to the property owner, on condition that the property owner pays him. Therefore, when the owner pays him he is merely fulfilling that condition and therefore his ownership began right when the house was built. The Ketsos (363, 5) also maintains that the land owner’s ownership of the building starts from when the building was built.
However, the difficulty with this explanation is: Why did the Gemoro say that the reason the builder had to pay anything is because the lot had been rented previously? If the house already belonged to the landowner, even retroactively, the Gemoro didn’t need the fact that the property was previously rented in order to require the builder to pay for use of the house. The Gemoro could have said that the reason the builder has to pay is that he used the orphan’s house and dirtied the walls during his use of their building.
The Rashbo does not offer any real answer to the question. However the Ketsos says that the orphans were minors, and minors are an exception since, due to a technical factor, they can only acquire the house when they actually pay for it.
Thus we have established that there is a major dispute among the Rishonim and Acharonim about when the property owner acquires a building that was built on his property. According to the Rosh, Rabbeinu Yerucham and the Talmidei Horosh Vehorashbo the property owner acquires the building when he pays for it and owns it only from then on. According to the Rashbo and the Ketsos, when he pays for it he acquires the building retroactively, from the time it was built.
Besides the Rishonim there are several Acharonim who rule that the building is only acquired from when it is paid for. Among these is the Ra’anach (1, 58 and 2, 3) and the Avnei Shayish (2, 82) and the Mishpatim Yeshorim (2, 187).
The Ramo (375, 7) writes, “If the builder rented the building to others we reduce the amount that the property owner must pay for the building. If he lived there himself he needs to pay the property owner, if the property owner had even a minor loss.”
The source of the second ruling is the previously cited Rabbeinu Yerucham and clearly indicates that according to the Ramo the property owner only acquires the building from when he pays for it, because if he acquires it from the time it was built he would not need to cause the owner a loss since his living in the house itself causes a loss to the property owner, as was noted by the meforshim of the Gemoro.
Based on this, it would seem difficult to understand the first ruling of the Ramo, namely, why does the builder have to reduce the amount which the property owner has to pay for the building as a result of his renting out the building, since the building is his until it is paid for?
However, R. Akiva Eiger (Notes on the Margin) writes (in the name of the Ra’anach) that the Rama does not mean that the amount the property owner needs to pay is reduced by the entire rent which the builder received. Rather, his intention is that the price is reduced by the amount of rent that can be attributed to the land on which the house was built. Whenever one rents a house there are two elements in the rental: there is the rental of the land and there is the rental of the building. The amount of rent which is attributable to the land is the amount which needs to be reduced from the price of the cost of the building since the land was not owned by the builder. This approach is in accordance with the interpretation of the Rosh and those who agree with him.
Returning to your question: You have to pay the sofer for his expenses in building. However, the amount you pay is reduced by the portion of the rent which he received which is attributable to the land. After the neighbors pay for the construction costs they are entitled to the entire rent. According to what you stated in your question, the neighbors allowed the builder to use it without paying rent for the land while he used it himself.