The Messenger of Allah ﷺ said, "I begin the prayer intending to prolong it, but then I hear a child crying, so I shorten my prayer, knowing how distressed his mother becomes at his crying."
حدثنا نصر بن علي الجهضمي حدثنا عبد الأعلى حدثنا سعيد عن قتادة
قال رسول الله ﷺ إني لأدخل في الصلاة وإني أريد إطالتها فأسمع بكاء الصبي فأتجوز في صلاتي مما أعلم لوجد أمه ببكائه
Bukhari narrated it in the Book of Adhan, Chapter: One who shortens the prayer when a child cries, no. 709, 710, and Muslim narrated it in the Book of Prayer, Chapter: Commanding imams to shorten the prayer while keeping it complete, no. 470, from the hadith of Saeed bin Abu Aruba, through this same chain.