Muwatta Malik, Book 9, Hadith 60 (USC-MSA)

Yahya related to me from Malik from Amir ibn Abdullah ibn az- Zubayr from Amr ibn Sulaymaz-Zuraqi from Abu Qatadaal-Ansari that the Messenger of Allah, may Allah bless him and grant him peace, said, "When you enter the mosque, you should pray two rakas before you sit down."

وَحَدَّثَنِي عَنْ مَالِكٍ، عَنْ عَامِرِ بْنِ عَبْدِ اللَّهِ بْنِ الزُّبَيْرِ، عَنْ عَمْرِو بْنِ سُلَيْمٍ الزُّرَقِيِّ، عَنْ أَبِي قَتَادَةَ الأَنْصَارِيِّ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ ‏ "‏ إِذَا دَخَلَ أَحَدُكُمُ الْمَسْجِدَ فَلْيَرْكَعْ رَكْعَتَيْنِ قَبْلَ أَنْ يَجْلِسَ ‏" ‏ ‏.‏

sunnah.com

also referenced under: Book 9, Hadith 391 (In-Book)