USC-MSA web (English) : Book 9, Hadith 37
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
لَوْ يَعْلَمُ الْمَارُّ بَيْنَ يَدَىِ الْمُصَلِّي مَاذَا عَلَيْهِ لَكَانَ أَنْ يَقِفَ أَرْبَعِينَ خَيْرًا لَهُ مِنْ أَنْ يَمُرَّ بَيْنَ يَدَيْهِ "
Yahya related to me from Malik from Abu 'n Nadr, the mawla of Umar ibn Ubaydullah from Busr ibn Said that Zayd ibn Khalid al-Juhani sent him to Abu Juhaym to ask him what he had heard from the Messenger of Allah (ﷺ) about passing in front of someone praying. Abu Juhaym said, "The Messenger of Allah (ﷺ) said, 'If the one who passes in front of a man praying knew what he was bringing upon himself it would be better for him to stop for forty than to pass in front of him.' " Abu 'n-Nadr said, "I do not know whether he said forty days or months or years."
Full reference and source
USC-MSA web (English) : Book 9, Hadith 37 Arabic : Book 9, Hadith 366
View source on Sunnah.com (opens in a new tab)