Sunnah.com reference : Book 2, Hadith 128English translation : Book 2, Hadith 254Arabic reference : Book 2, Hadith 256
Narrated [Abu Hurairah (RA)]:
Allah's Messenger (ﷺ) said: "Whoever hears a man crying out in the mosque about something he has lost, he should say, 'May Allah not restore it to you', for the mosques were not built for this."

[Reported by Muslim].
وَعَنْهُ قَالَ : قَالَ رَسُولُ اَللَّهِ ‏- صلى الله عليه وسلم ‏-{ مَنْ سَمِعَ رَجُلاً يَنْشُدُ ضَالَّةً فِي اَلْمَسْجِدِ فَلْيَقُلْ : لَا رَدَّهَا اَللَّهُ عَلَيْكَ , فَإِنَّ اَلْمَسَاجِدَ لَمْ تُبْنَ لِهَذَا }  رَوَاهُ مُسْلِم ٌ  1‏‏1 ‏- صحيح .‏ رواه مسلم (568)‏ .‏