Our Gemara on Amud Beis discusses a scenario where two partners in a yard make an oath, forbidding each from deriving benefit from the other. Some of the factors that must be considered are: if this is a yard can be divided. That is, there are certain legal rules that dictate whether or not the area is big enough to be divided. In Choshen Mishpat, if a yard is too small to bevdivisible in an equitable manner, one partner may force the other to either allow it to be bought out by him or to agree to buy him out. (See Shulkhan Arukh CM 171 for details.)

As some of the readers might be aware by now, I am particularly fond of the genre of rabbinic derush that projects backward halakhic debates onto biblical figures. Using these halachos, Shem MiShmuel (Chayye Sarah 9) answers what is actually a rather difficult question and claim against Avraham‘s behavior. 

Everyone knows that one of the Ten Commandments is to not covet. However, the halakhic definition of lo sachmod is to desire a property or object and pressure the person to sell it to you. If one succeeds in this coercive act by actually purchasing the desired object, he violated the prohibition of lo sachmod (See Shulkhan Arukh CM 359:10.) If one merely desired to the point that he is scheming to acquire, but has not yet taken any action he violates a different prohibition of “do not desire“ (ibid). If so, how can we understand Avraham’s behavior as described when he tries to acquire the Ma’aras HaMachpelah? Clearly from the context of the story, Ephron the Hittite was not so happy to sell this parcel of land, and even more so that Avraham made the request in front of his towns folk making it embarrassing for him to refuse the offer puts Avraham in a situation of questionable ethics. (See Bereishis, 23:4-16.)

To answer this question, Shem MiShmuel ties in another fascinating halacha regarding finding an object in the walls of a home. The Mishna (Bava Metzi’a (2:3) teaches:

מָצָא בְגַל אוֹ בְכֹתֶל יָשָׁן, הֲרֵי אֵלּוּ שֶׁלּוֹ. 

If one found lost items in a heap of stone rubble or in an old wall, these belong to him.

The Rambam (Gezeila Veaveidah 16:8) explains:

וְהוֹאִיל וַחֲצֵרוֹ שֶׁל אָדָם קוֹנָה לוֹ שֶׁלֹּא מִדַּעְתּוֹ כְּמוֹ שֶׁיִּתְבָּאֵר לָמָּה לֹא יִקְנֶה בַּעַל הֶחָצֵר זֶה הַמַּטְמוֹן שֶׁבְּתוֹךְ הַכֹּתֶל הַיָּשָׁן אַף עַל פִּי שֶׁהוּא שֶׁל אֱמוֹרִיִּים וְתִהְיֶה מְצִיאָה זוֹ לְבַעַל הֶחָצֵר. מִפְּנֵי שֶׁאֵינוֹ יָדוּעַ לוֹ וְלֹא לַאֲחֵרִים וַהֲרֵי זֶה הַמַּטְמוֹן אָבוּד מִמֶּנּוּ וּמִכָּל אָדָם וּלְפִיכָךְ הוּא שֶׁל מוֹצְאוֹ. וּמַה אֲבֵדָה שֶׁל אָדָם אָמְרָה תּוֹרָה (דברים כב ג) "אֲשֶׁר תֹּאבַד מִמֶּנּוּ וּמְצָאתָהּ" מִי שֶׁאֲבוּדָה מִמֶּנּוּ וּמְצוּיָה אֵצֶל כָּל אָדָם יָצָאת זוֹ שֶׁנָּפְלָה לַיָּם שֶׁאֲבוּדָה מִמֶּנּוּ וּמִכָּל אָדָם קַל וָחֹמֶר לְמַטְמוֹן קַדְמוֹנִי שֶׁלֹּא הָיָה שֶׁלּוֹ מֵעוֹלָם וְהוּא אָבוּד מִמֶּנּוּ וּמִכָּל אָדָם לְפִיכָךְ הוּא שֶׁל מוֹצְאוֹ: 

Since a person's domain can acquire property on his behalf without his knowledge, as will be explained, why does the owner of this courtyard not acquire the treasure buried within the old wall even if it originally belonged to the Amorites, and thus he would become its legal owner? The rationale is that the treasure was not known about by him or by others. Thus, it was "lost to him and to all others." Therefore, it belongs to the finder.Our Sages derived this concept as follows: With regard to a lost object, the Torah Deuteronomy 22:3 states: "That is lost by him and found." This refers to an article that the owner lost, but others can find, thus excluding an article that fell into the sea and is "lost to him and all others." Surely, this applies to an ancient treasure that the person never owned. It is certainly "lost to him and all others." Therefore, it belongs to the finder.

There was a great and hidden spiritual dimension to the Machpela cave that Ephron was unaware of. This dimension Avraham was able to acquire, Regardless of the current owner. This is similar to the hidden treasures found in the wall of a home which can be acquired by anybody. Thus, unbeknownst to Ephron, Avraham was already a partner in the Machpela Cave. As a partner, he could force a buyout and it is not considered a violation of lo sachmod.