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]
It was narrated from Samurah that the Messenger of Allah (ﷺ), said: If two (separate) authorized persons make a sale (of the same thing), then the first transaction is the one that is valid.