Amr bin Shareed reported,

Miswar bin Makhrama came and placed his hand on my shoulder, and I went with him to Saad. Abu Rafi said to Miswar, "Will you not order this man to buy from me my house that is within my dwelling?"Saad said, "I will not give him more than four hundred, either in installments or deferred payments."Abu Rafi replied, "I have been offered five hundred in cash and I refused. Were it not that I heard the Prophet ﷺ say, 'A neighbor has the greater right to what is adjacent to him,' I would not have sold it to you," or he said, "I would not have given it to you."I said to Sufyan, "Muamar did not narrate it like this."He replied, "But he narrated it to me this way."Some people have said that if someone wants to sell something subject to pre-emption, he may use a stratagem to nullify the right of pre-emption. The seller gifts the house to the buyer, defines its boundaries, and hands it over to him, and the buyer compensates him with a thousand dirhams. In this way, the pre-emptor has no right of pre-emption in it.

Bukhari 6977

Sahih

حدثنا علي بن عبد الله حدثنا سفيان عن إبراهيم بن ميسرة سمعت

عمرو بن الشريد قال

جاء المسور بن مخرمة فوضع يده على منكبي فانطلقت معه إلى سعد فقال أبو رافع للمسور ألا تأمر هذا أن يشتري مني بيتي الذي في داري فقال لا أزيده على أربع مائة إما مقطعة وإما منجمة قال أعطيت خمس مائة نقدا فمنعته ولولا أني سمعت النبي ﷺ يقول الجار أحق بصقبه ما بعتكه أو قال ما أعطيتكه قلت لسفيان إن معمرا لم يقل هكذا قال لكنه قال لي هكذا وقال بعض الناس إذا أراد أن يبيع الشفعة فله أن يحتال حتى يبطل الشفعة فيهب البائع للمشتري الدار ويحدها ويدفعها إليه ويعوضه المشتري ألف درهم فلا يكون للشفيع فيها شفعة

البخاري 6977صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Trickery
Chapter
Gifts and preemption
Numbering
Darussalam 6977
Bukhari 6977