Here we'll talk about a situation where there's a two-story house with two different owners. Owner number one lived on the first floor, and owner number two lived on the top floor, the second floor. The house falls down, and the person living on the ground floor does not want to rebuild it, but the person on the top floor does.
The Mishnah says, “If you have a two-story house that was owned by two people and it fell down, if the owner of the upper story told the owner of the lower story to build the house so that the upper story could now be rebuilt on top of it”—so he wanted the level-one apartment to be rebuilt so he could then go live in his level-two apartment. But the ground-floor owner does not want to rebuild. The owner of the upper story would be allowed to rebuild the ground floor himself, and he would be able to live in that ground-floor apartment until the owner of the ground-floor apartment pays him for the building expenses.
The owner of the ground floor is obligated to ensure that the upper story has a level-one apartment. He has the obligation to rebuild in the case of a disaster. When disaster happens, it's the obligation of the bottom-floor owner to rebuild his house. There's an implied agreement between them. So, if he doesn't fulfill his obligation to rebuild, the owner of the second-floor apartment can rebuild on the ground floor and live there until the owner of the house pays proper compensation.
Rabbi Yehuda says, “Harei zeh dar betoch shel chavero vetzarich leha'alot lo sachar (This one lives in his fellow's property and must pay him rent).” Rabbi Yehuda says they're really arguing here about a principle: when one person benefits and the other person doesn't lose anything, is there a need to pay or not? Rabbi Yehuda says that's all correct, whatever we said above. But the question becomes: what happens when the owner of the ground floor does pay for the rebuild? Is the owner of the second floor now obligated to pay retroactively for the rent for living in his friend's property? He receives some sort of benefit here. He lived in that apartment when he didn't have an apartment to live in. So the owner of the second-floor apartment is benefiting because now he's living in an apartment that he didn't have. But the owner of the first-floor apartment is not losing out because there was no apartment built there anyway.
So that's where there's a machloket (dispute). According to Tanna Kamma (the first tanna), as we just said, Zeh neheneh vezeh lo chaser, in that situation where one person benefits and the other doesn't lose anything by that benefit, he would say patur—the person who's benefiting is not obligated to pay for the benefit he had. Rabbi Yehuda argues that, in this case, after the payment has been made, the person who was living in his friend's property, who went and lived on the first floor, did receive monetary benefit from his friend because he lived in his apartment. So, therefore, he would have to pay the owner of the ground floor rent for all the time that he lived there because he received monetary benefit. He used somebody else's property and, therefore, he would have to pay for that benefit. According to Rabbi Yehuda, Zeh neheneh vezeh lo chaser, hayav—somebody benefits. Even though it's not at the expense of somebody else, he would still be obligated to pay for that benefit.
So, what is Rabbi Yehuda's solution? What should the owner of the second floor do? Rabbi Yehuda's recommendation is that, to avoid paying that rent, the owner of the upper story that collapsed should rebuild both floors, the ground floor and the upper floor. He should build a roof over the upper story. Now the full house is like it was before. But he needs to motivate or incentivize the owner of the lower apartment to pay him back for half of the rebuild. So what does he do? Then he could live in the lower apartment until the owner of the ground floor pays for the expenses. Now that there's another apartment above, the second-floor apartment is ready, and he can technically go live there. He's not really receiving any benefit by living in the ground-floor apartment. He could live upstairs if he wants to. The only benefit, the only thing he's gaining here, is that he's incentivizing the owner of apartment number one on the first floor to pay what he's due. Pay what he's due. That's what he's supposed to pay. So, therefore, he's not really gaining here. Since he has another apartment, he could just go upstairs. By pushing away that benefit, Rabbi Yehuda says he wouldn't be obligated to pay rent when the owner of the first-floor apartment eventually paid him. There would be no obligation to pay him rent retroactively because he never really benefited. It's not a case of benefiting, because he could have lived upstairs if he wanted to.

