Sunan Ibn Majah, Book 13, Hadith 37 (Ibn Majah 2344)

It was narrated from ('Uqbah bin 'Amir or) Samurah bin Jundub that :

the Messenger of Allah (ﷺ) said: “If a product is sold to two men, it is for the one who was first.”