The Book of the Prohibited actions
Riyad as-Salihin #1017
كتاب الأمور المنهي عنها
عن أبي هريرة رضي الله عنه أنه سمع رسول الله صلى الله عليه وسلم يقول: «من سمع رجلا ينشد ضالة في المسجد فليقل: لا ردها الله عليك، فإن المساجد لم تبنَ لهذا» ((رواه مسلم)).
Abu Hurairah (May Allah be pleased with him) said:
The Messenger of Allah (ﷺ) said, “If anyone hears a man inquiring in the mosque about something he has lost, he should say: 'La raddaha Allahu 'alaika (May Allah not restore it to you),' for mosques are not built for this purpose.”
عن أبي هريرة رضي الله عنه أنه سمع رسول الله صلى الله عليه وسلم يقول: "من سمع رجلا ينشد ضالة في المسجد فليقل: لا ردها الله عليك، فإن المساجد لم تبنَ لهذا" ((رواه مسلم)).
The Messenger of Allah (ﷺ) said, "If anyone hears a man inquiring in the mosque about something he has lost, he should say: 'La raddaha Allahu 'alaika (May Allah not restore it to you),' for mosques are not built for this purpose."
— Riyad as-Salihin, Hadith 1017