"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)
أَنَّ النَّبِيَّ ﷺ قَالَ إِذَا اجْتَمَعَ ثَلَاثَةٌ فَلْيَؤُمَّهُمْ أَحَدُهُمْ وَأَحَقُّهُمْ بِالْإِمَامَةِ أَقْرَؤُهُمْ