Question
When the contractor built our building, he left about sixty meters of unbuilt space. The reason he did so is because he had used up his building rights and was not allowed to build any more on the land. About five years ago one of the neighbors proposed that we jointly build an apartment on the unused space and rent it out. Many of the neighbors said it was a good idea but no one actually gave any money and so that neighbor built something himself and has been using it as extra bedrooms since he has a large family. Recently another neighbor proposed that we pay the neighbor who built it and rent out the apartment that he built. One issue we have is whether we can deduct rental money for the years that he used the property from the amount that we need to pay him.
Answer
Before we can address your question, we must clarify from the standpoint of halacha the status of the neighbor who built in the unused space. First, you correctly assume that the space is jointly owned by all of the apartment owners in the building. This is correct since the law is that any property that does not belong to a private individual is jointly owned. Since the one who built is one of the apartment owners in the building, your situation is that one partner improved a property that belongs to several partners. Since the partners did not hire him to do the job, the neighbor who built is considered to be a yoreid to the jointly-owned property.
There are two types of yoreid: those who improve a property without the permission of the property's owner who are called a yoreid shelo birshus, and those who have permission to improve the property, who are called a yoreid birshus.
In your case the neighbor who built has the status of a yoreid birshus for two reasons. One reason is that the neighbors consented to the neighbor's plan to build an apartment, and the second is that even if even if the neighbors had not consented, the Gemara (BB 42B) rules that any partner who improves jointly-owned property is classified as a yoreid birshus.
Once the neighbors reimburse the one who built, they become joint owners of the improved property and, like in all partnerships; they will all decide what to do with the jointly-owned property. Your questions are concerned with the status of the improved property in the time before the neighbors reimburse the one who built.
In order to answer your question, it is critical to determine whether, when the neighbors reimburse the neighbor who built, they become owners of the improvement retroactively, or they only become owners from the time they pay. If they acquire the improvement retroactively, then even before they paid, the builder used their property (retroactively). However, if they do not acquire the improvement retroactively, then the neighbor who built was using his own property the entire time.
There is a case of yoreid in the Gemara (BK 21A) where the Rishonim dispute this very issue. This case concerned a person who built a palace on an empty property of orphans and lived there until the orphans reimbursed him for his expenses. The Rashbo understood that the Gemara ruled that the one who built the palace was required to pay rent in full for using the palace that he built, even though at the time that he used the palace the orphans had not yet reimbursed him for his expenses. The Rashbo explains that the reason for this ruling of the Gemara is that once the orphans do reimburse him for his expenses, they acquire the house retroactively. Therefore, the one who built was required to pay rent for the palace he had built since retroactively he was living in the orphans' palace.
However, other Rishonim including the Rosh (BK 2, 6) and Rama (cited by the Nimukei Yosef) and explicitly in the the Chiddushei Talmid Horashbo vehoRosh understand that the Gemara ruled that the one who built did not have to pay for using the palace and was only required to reimburse the orphans for using their land. This opinion maintains that when the owner of the property reimburses the builder for his expenses, he does not acquire the improvement retroactively. We note that this issue remains undecided. (See Mishpatei Yosher Volume 2 chapter 5 for a lengthy discussion of this issue.)
However, even though the core issue in your case is the same as the issue in this case of the Gemara, your case is somewhat different. One difference is that in the case of the Gemara the one who improved the land was an outsider, whereas in your case he is a partner. A second difference is that in the case of the Gemara the Rashbo points out that the land owners were underage orphans who were not expected to pay immediately, whereas in your case they are adults who could be expected to pay the builder immediately.
In any case there are various proofs that a person who builds on another person's property does not have to pay rent for using the property up to the time that he is paid. For example, the Rosh (BM 8, 23) cites the Ra'avad who rules that if someone builds on another person's empty land then the one who built can stay in the building until the owner pays him for improving his property.
This was also the ruling of the Rosh (res. Teshuvos Nosafos 34 also cited by the Tur (siman 375) and ruled by the Ramo (375, 7)) concerning A who rebuilt B's house which was on the verge of collapse and lived there in B's absence. When B returned, he asked beis din to evict A from his house. The Rosh ruled that B does not have the right to evict A until he reimburses him for his expenses in salvaging B's house.
Similarly, the Mishna (BM 117A) rules that if a two-story house where each floor has a different owner collapses and the owner of the upper floor wants to rebuild, and the owner of the lower floor does not want to rebuild at that time, the owner of the upper floor can build the lower floor and live there for free until he receives payment from the owner of the lower floor for having built his floor.
The Chazon Ish (BB 2, 6) notes that apparently the owner of the second-floor cannot force the owner of the lower floor to pay him for improving his property. All he can do to encourage the owner of the first floor to reimburse him is to live in the lower floor until he is reimbursed. He explains that the reasoning behind this approach is that since the owner of the lower floor did not ask the owner of the upper floor to fix his property, he cannot be obligated to pay for the improvement as long as he does not use the improvement (or otherwise indicate his consent). One cannot give something to someone and then force him to pay for it.
The owner of the property owes money to the one who improved his property but, in contrast to other debts where we force the debtor to pay his debt, here we do not force payment. We do however, exert pressure on the owner of the property to pay his debt by granting permission to the one who improved the property to use his improvement until he receives payment.
This was also the ruling of the Ra'anach (1, 58) when an individual spent money in order to build for the community (at their request) but was not reimbursed by the community. He ruled that if the one who improved the property rented it out to others, the community does not have a claim on the rent, because until they pay for the improvement it belongs to the one who paid for the improvement.
The To'afos Re'eim (Toibes CM 9) ruled this way in a case that was the same as yours: one of two partners paid to build on their jointly owned property and used it. He ruled that until he was reimbursed for his expenses the partner who improved the property had the right to live in his improvement rent free and did not even have to pay rent for use of the land on which the improvement was built.
This was also the ruling of the Panim Me'eros (1, 62 and cited by Pischei Teshuvo (164, 4)) in the case of two partners where one partner built on the joint property. He also ruled that the partner who built was entitled to full reimbursement for his expenses even though he used the house that he built before he was reimbursed.
Thus, we have seen that the neighbors have no claim to receive rent from the one who used the building in the jointly-owned space before they paid him for his improvement. In some situations, there may be an issue concerning rental payment for the use of the land which had been improved. However, in your situation since the space was not being rented out to others, the neighbors cannot claim rent for use of the land since they did not suffer a loss.
In conclusion: When the neighbors reimburse the one who built up the unused space for his expenses, they must pay in full and may not reduce the price due to the builder's use of the apartment that he built.