What is meant by “the two shaykhs” is Imam al-Bukhaari and Imam Muslim (may Allaah have mercy on them).
Al-Bukhaari is Muhammad ibn Ismaa’eel al-Bukhaari (d. 256 AH). He wrote a book, Saheeh al-Bukhaari, in which he compiled a number of saheeh ahaadeeth from our Prophet (peace and blessings of Allaah be upon him).
Muslim is Muslim ibn al-Hajjaaj al-Nisaboori (d. 261 AH). He is the author of Saheeh Muslim. These two books – Saheeh al-Bukhaari and Saheeh Muslim – are the soundest books of ahaadeeth from our Prophet (peace and blessings of Allaah be upon him).
If it is said of a hadeeth that it was “narrated by the two Shaykhs”, what is meant is that it was narrated by al-Bukhaari and Muslim in their Saheehs. The same applies if it says “agreed upon,” i.e., al-Bukhaari and Muslim both agreed on its narration.
Al-Nawawi (may Allaah have mercy on him) said in the introduction to Sharh Muslim (1/14): The scholars (may Allaah have mercy on them) are agreed that the soundest of books after the Holy Qur’aan are al-Saheehayn, i.e., the two Saheehs of al-Bukhaari and Muslim, and the ummah accepted that from them. The book of al-Bukhaari is the sounder and more useful of the two. End quote.
And Allaah knows best.