Bava Metzia10: 3
הַבַּיִת וְהָעֲלִיָּה שֶׁל שְׁנַיִם שֶׁנָּפְלוּ, אָמַר בַּעַל הָעֲלִיָּה לְבַעַל הַבַּיִת לִבְנוֹת, וְהוּא אֵינוֹ רוֹצֶה לִבְנוֹת — הֲרֵי בַעַל הָעֲלִיָּה בּוֹנֶה אֶת הַבַּיִת, וְדָר בְּתוֹכוֹ עַד שֶׁיִּתֵּן לוֹ אֶת יְצִיאוֹתָיו. רַבִּי יְהוּדָה אוֹמֵר: אַף זֶה דָּר בְּתוֹךְ שֶׁל חֲבֵרוֹ צָרִיךְ לְהַעֲלוֹת לוֹ שָׂכָר; אֶלָּא בַּעַל הָעֲלִיָּה בּוֹנֶה אֶת הַבַּיִת וְאֶת הָעֲלִיָּה, וּמְקָרֶה אֶת הָעֲלִיָּה, וְיוֹשֵׁב בַּבַּיִת עַד שֶׁיִּתֶּן לוֹ אֶת יְצִיאוֹתָיו.
[If] a ground floor and an upper story belonging to two [people] collapsed, [and] the owner of the upper story demanded of the owner of the ground floor that he rebuild, but he refuses —- the owner of the upper story may rebuild the ground floor, and live in it until he reimburses him. R’ Yehudah says: Even this one [who] lives in his neighbor’s property must pay him rent. Rather, the owner of the upper story rebuilds [both] the ground floor and the upper story, and puts a roof on the up-per story, and lives in the ground floor until he reimburses him.