Abu Rafi reported,

Saad bargained with him over a house for four hundred mithqals, then said, "Were it not that I heard the Messenger of Allah ﷺ say, 'A neighbor has the greatest right to what is adjacent to him,' I would not have sold it to you."Some people said that if a person buys a share of a house and wishes to nullify the right of pre-emption, he can gift it to his young son, and no oath would be required of him.

Bukhari 6978

Sahih

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

عن أبي رافع

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

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