"Jabir (Allah be pleased with him) reported: There came a slave and pledg- ed allegiance to Allah's Apostle (may peace be upon him) on migration; he (the Holy Prophet) did not know that he was a slave. Then there came his master and demanded him back, whereupon Allah's Apostle (may peace be upon him) said: Sell him to me. And he bought him for two black slaves, and he did not afterwards take allegiance from anyone until he had asked him whether he was a slave (or a free man)" - Book 010, Number 3901
I found the above verse/hadith somewhere and whenever I search to find its source, the top pages (except perhaps the first) are from Islamophobic websites that I don't trust, but I can't find it in Quran.com hence I want to know the validity of it.
Which chapter in the Quran is it from? If it's not from the Quran, where is it from?
Your quote isn't a verse of the Quran so searching it on Quran.com is a waste of time. It is a hadith which you may find in sahih Muslim in The Book of Musaqah, Chapter: "The permissibility of selling animals for animals of the same kind and of different quality".
in the name of allah the most beneficent the most merciful
the hadith you mentioned in arabic is :
حَدَّثَنَا يَحْيَى بْنُ يَحْيَى التَّمِيمِيُّ، وَابْنُ، رُمْحٍ قَالاَ
أَخْبَرَنَا اللَّيْثُ، ح وَحَدَّثَنِيهِ قُتَيْبَةُ، بْنُ سَعِيدٍ
حَدَّثَنَا لَيْثٌ، عَنْ أَبِي الزُّبَيْرِ، عَنْ جَابِرٍ، قَالَ جَاءَ
عَبْدٌ فَبَايَعَ النَّبِيَّ صلى الله عليه وسلم عَلَى الْهِجْرَةِ
وَلَمْ يَشْعُرْ أَنَّهُ عَبْدٌ فَجَاءَ سَيِّدُهُ يُرِيدُهُ فَقَالَ
لَهُ النَّبِيُّ صلى الله عليه وسلم " بِعْنِيهِ " . فَاشْتَرَاهُ
بِعَبْدَيْنِ أَسْوَدَيْنِ ثُمَّ لَمْ يُبَايِعْ أَحَدًا بَعْدُ حَتَّى
يَسْأَلَهُ " أَعَبْدٌ هُوَ " . sahih muslim 22/152
this hadith is Athentic , you mentioned something about that Islamophobic websites use it . actually i don't find anything in this hadith could be used against islam . if there is anything feel free to ask about
Like any library, Islam Stack Exchange offers great information, but does not offer personalized advice or legal verdicts, and does not take the place of seeking such advice from your Mufti, Imam, or other trustworthy Counselor.