Answer:
a.
;
b. 
Step-by-step explanation:
We need here to apply the <em>Multiplication Principle </em>or the <em>Fundamental Principle of Counting</em> for each answer. Answer <em>b</em> needs an extra reasoning for being completed.
The <em>Multiplication Principle</em> states that if there are <em>n</em> ways of doing something and <em>m</em> ways of doing another thing, then there are <em>n</em> x <em>m</em> ways of doing both (<em>Rule of product</em> (2020), in Wikipedia).
<h3>In how many ways can ten students line up? </h3>
There are <em>ten</em> students. When one is selected, there is no other way to select it again. So, <em>no repetition</em> is allowed.
Then, in the beginning, there are 10 possibilities for 10 students; when one is selected, there are nine possibilities left. When another is selected, eight possibilities are left to form the file, and so on.
Thus, we need to multiply the possibilities after each selection: that is <em>why</em> the <em>Multiplication Principle</em> is important here.
This could be expressed mathematically using n!:

For instance, 
So, for the case in question, the <em>ten</em> students can line up in:
ways to line up in a single file.
<h3>Second Question</h3>
For this question, we need to consider the former reasoning with extra consideration in mind.
The members of Group 1 can occupy <em>only</em> the following places in forming the file:
<em>places</em>.
The members of Group 2 <em>only</em>:
<em>places</em>.
And the members of Group 3, the following <em>only</em> ones:
<em>places.</em>
Well, having into account these possible places for each member of G1, G2 and G3, there are: <em>10! ways</em> for lining up members of G1; <em>10! ways</em> for lining up members of G2 and, also, <em>10! ways</em> for lining up members of G3.
After using the <em>Multiplication Principle</em>, we have, thus:
<em>ways the students can line up to come in from recess</em>.