Ibn al-Subki included al-Bukhari and Muslim among the Shafiʿis while Ibn Abi Yaʿla included them among the Hanbalis.
In truth, al-Bukhari was neither Shafiʿi nor Hanbali but a Mujtahid Mutlaq with his own madhhab, which did not survive him as he was uninterested in other than his Sahih for a school, and the Sahih is truly a complex and concise fiqh manual. (It is therefore misleading to characterize the Six Books only as Kutub Zahir al-Riwaya - "the books of the external aspects of narration" cf. M. ʿAbd al-Latif Farfur in his Tarikh al-Fiqh al-Islami.)
Muslim was al-Bukhari's close student and probably followed his Madhhab, but he was definitely a Mujtahid murajjih i.e. s.o. with full knowledge of Ijmaʿ and Khilaf, competent to evaluate all the pre-existing juridical conclusions of the Schools of the Companions and Tabiʿin and choose the most correct in his view.
Al-Tirmidhi was also al-Bukhari's close student and a Mujtahid Murajjih and comparatist of the first rank whose method and school, like al-Bukhari, is developed in his book - the Sunan - not only in the chapter-titles like al-Bukhari, but in the bodies of the chapters themselves and in more explicit terms than his teacher. See ʿItr's masterpiece _Al-Imam al-Tirmidhi wa al-Muwazana Bayna Jamiʿihi wa Bayn al-Sahihayn_.
It is important to realize the huge debt these two owe to their teacher al-Bukhari. Our teacher Nur al-Din ʿItr - Allah keep him in his best care - told us that without Muhammad ibn Ismaʿil al-Bukhari, neither Muslim nor al-Tirmidhi would have made one step here nor there, and without Zayn al-Din al-ʿIraqi, Ibn Hajar al-ʿAsqalani would have gone nowhere.
Abu Dawud was a student of Imam Ahmad whose madhhab he followed.
Al-Nasa'i was without doubt a Shafiʿi.
I do not know the madhhab of Imam Ibn Majah.
As anyone can see, it is meaningless to simply say of the above scholars that they were of the vague "school of ahl al-Hadith" as that purported school no more existed, as a unit, than the vague "school of ahl al-Ra'y".
Those appellations split into infinite varieties and branches between each major imam and the next, whereas the eponymous Schools - such as the fiqh of each Sahabi, that of each Tabiʿi, that of the Four Imams and their contemporaries - do show internal cohesiveness in method and terminology.
What is true and accurate is that the Two Shaykhs and the compilers of the Sunan were "Ahl al-Hadith" because they focussed _primarily_ on hadith and its sciences, whereas their counterpart, Ahl al-Ra'y - such as Imams Malik, Abu Hanifa and their students - emphasized jurisprudence over hadith narration.
Imam al-Shafiʿi, by the grace of Allah, united with near-perfection the two currents and so did his students such as al-Muzani and Abu Thawr. That is why Ulema such as ʿAbd al-Rahman ibn al-Mahdi could not find enough words to praise his intelligence; and you will find that the vast majority of the Imams of hadith and hadith masters after his time follow the Shafiʿi madhhab, beginning with al-Daraqutni, Ibn Abi Hatim and his father, al-Baghawi, Ibn Khuzayma, Ibn Hibban, al-Khatib, and others. Even al-Tabari, Dawud al-Zahiri, and Ibn Hazm began as Shafiʿis. WAllahu aʿlam.
PS See also http://sunnah.org/history/Scholars/Default.htm for the biographies of the Four Imams and Imam al-Bukhari.
Blessings and peace on the Prophet ﷺ, his Family, and all his Companions, and may Allah be well-pleased with their excellent Followers; and the Mujtahid Imams of the past; and the pious, Godwary Ulema; and the righteous Awliya; and our Shuyukh in the Most Distinguished Naqshbandi Path, especially the Imam of Tariqa and Ghawth of creatures Khwaja Baha' al-Din Naqshband, Muhammad al-Uwaysi al-Bukhari; and Sultan al-Awliya', the teacher of our teacher, Sayyidi ʿAbd Allah al-Fa'iz al-Daghistani; and our beloved Shaykh, the light of our eyes, Mawlana al-Shaykh Muhammad Nazim al-Haqqani; and the rest of our Masters and the Siddiqiyyun. Amin.Hajj Gibril