It's not a rule. It's responding to the question. The question explicitly states that only J... A... M is an acceptable order. So for every arrangement of the other children, the only acceptable one is the one that has J.. A... M in that order. Only one in six (the six comes from 3! and the the 3 in 3! comes from the fact that there are three people in the group J...A... M) will have that arrangement.
If you don't see why ...
Let's call the other seven children 1 2 3 4 5 6 7.
Here's one random arrangement of them, with J and A and M in it.
1 J 2 3 A 4 5 6 M 7
Here's some similar arrangements:
1
J 2 3
A 4 5 6
M 7
1
J 2 3
M 4 5 6
A 7
1
A 2 3
J 4 5 6
M 7
1
A 2 3
M 4 5 6
J 7
1
M 2 3
J 4 5 6
A 7
1
M 2 3
A 4 5 6
J 7
What's the same is the other 7 children. What's different is the J... A... M.
If you "tune out" the other children, you see what's happening. This is all 6 permuations of JAM.
JAM
JMA
MAJ
MJA
AJM
AMJ
Of those six arrangements (and you can find that by 3! if you don't want to list it), only one is acceptable.
The same will be true of any arrangement of the other 7 children.
So, there are a grand total of 10! ways to arrange all 10 children. If we divide by 3!, we'll get rid of the unacceptable arrangements.
I believe my original explanation is fairly clear if you begin at the beginning. If you understand why you'd divide by two if we're only talking about J and A, then you can apply that understanding to why you'd divide by 6, aka, 3!, when we're talking about J and A and M.
I can't explain it any more without repeating myself, so I hope that's enough. If it isn't, maybe you're one of the people who likes to just apply formulas without understanding them, and that's ok, a lot of people are like that.