The answer is: We do as some scholars have said: place an adult man between every two boys, so that an adult man stands in a row, then a boy beside him, then a man, then a boy, then a man, then a boy. This is more conducive to order and further removes the possibility of disruption. Although this may entail some men standing in the second or third row, depending on the number of boys, it achieves a benefit: attentiveness in prayer and freedom from distraction.
What we have said regarding placing the men first, then the boys, then the women applies only at the outset. But if one of lesser precedence reaches a place of greater precedence first—for example, if a boy arrives early, moves forward, and takes his place in the first row—then the stronger view, adopted by some scholars, including the grandfather of Shaykh al-Islam Ibn Taymiyyah, Majd al-Din Abd al-Salam, is that he should not be made to leave his place. This is based on the Prophet’s saying: “Whoever reaches something before any other Muslim has reached it has the right to it.” (1) This general wording encompasses everything in which people have an equal claim: whoever reaches it first is more entitled to it. Moreover, the Prophet said: “A man should not make another man rise from his seat and then sit in it himself.” (2) And because doing so is an act of wrongdoing against him.
If someone were to say: “Whoever reaches something before anyone else has reached it is more entitled to it” is general, whereas his saying, “Let those among you who possess maturity and understanding stand closest to me,” (3) is specific,