ENOfficial
It was narrated from 'Uqbah bin 'Amir or Samurah bin Jundab that the Messenger of Allah (ﷺ) said: "Any man who sells to two men, it is for the one who was first."[1]
Source: sunnah.com
Other translations
Arabic
حَدَّثَنَا حُمَيْدُ بْنُ مَسْعَدَةَ، حَدَّثَنَا خَالِدُ بْنُ الْحَارِثِ، حَدَّثَنَا سَعِيدٌ، عَنْ قَتَادَةَ، عَنِ الْحَسَنِ، عَنْ عُقْبَةَ بْنِ عَامِرٍ، أَوْ سَمُرَةَ بْنِ جُنْدُبٍ عَنِ النَّبِيِّ ـ صلى الله عليه وسلم ـ قَالَ " أَيُّمَا رَجُلٍ بَاعَ بَيْعًا مِنْ رَجُلَيْنِ فَهُوَ لِلأَوَّلِ مِنْهُمَا " .
sunnah.com