"when there are three people let one of them lead the prayer, and the one who is most entitled to lead the prayer is the one who has most knowledge of the Qur'an." (Using translation from Nasāʾī 782)
عَنِ النَّبِيِّ ﷺ إِذَا كَانُوا ثَلَاثَةً فَلْيَؤُمَّهُمْ أَحَدُهُمْ وَأَحَقُّهُمْ بِالْإِمَامَةِ أَقْرَؤُهُمْ