HAKIM 311: from Abū Umāmah —
[Machine] The Messenger of Allah ﷺ said, "Whoever goes to the mosque desiring only to learn good or to teach it, will have the reward of a complete Umrah pilgrimage. And whoever goes to the mosque desiring only to learn good or to teach it, will have the reward of a complete Hajj pilgrimage." (Bukhari has cited Thawr bin Yazid in his book "Al-Usul", and Muslim has mentioned it in "Al-Shawahid". As for Thawr bin Yazid Al-Daili, there is agreement on its authenticity according to Al-Bukhari's criteria.)

الحاكم ٣١١: عن ابو امامه —
قَالَ رَسُولُ اللَّهِ ﷺ «مَنْ غَدَا إِلَى الْمَسْجِدِ لَا يُرِيدُ إِلَّا لِيَتَعَلَّمَ خَيْرًا أَوْ يَعْلَمَهُ كَانَ لَهُ أَجْرُ مُعْتَمِرٍ تَامِّ الْعُمْرَةِ فَمَنْ رَاحَ إِلَى الْمَسْجِدِ لَا يُرِيدُ إِلَّا لِيَتَعَلَّمَ خَيْرًا أَوْ يُعَلِّمَهُ فَلَهُ أَجْرُ حَاجٍّ تَامِّ الْحِجَّةِ» «قَدِ احْتَجَّ الْبُخَارِيُّ بِثَوْرِ بْنِ يَزِيدَ فِي الْأُصُولِ وَخَرَّجَهُ مُسْلِمٌ فِي الشَّوَاهِدِ فَأَمَّا ثَوْرُ بْنُ يَزِيدَ الدِّيلِيُّ فَإِنَّهُ مُتَّفَقٌ عَلَيْهِ» على شرط البخاري


Sound Chain per Bukhārī (Dhahabī)
Ḥākim > Book of Knowledge > § [Machine] As for the statement of Abdullah ibn Numayr...
hadithunlocked.com