Answer: 25 students.
Explanation:
Let's assume that the smaller class has x students. Then, the larger class must have x + 7 students.
If Mdm Tan gets the students into groups of 6, there will be 19 students left without a group. This means the total number of students must be 6n + 19 for some integer n:
x + x + 7 = 2x + 7 students (total number of students)
6n + 19 = 2x + 7 (19 students left over)
Solving for x gives x = 25. Therefore, the smaller class has 25 students and the larger class has 32 students.
If Mdm Tan gets the students to form groups of 8, there will be only 1 student in the last group. This means the total number of students must be 8m + 1 for some integer m:
x + x + 7 = 2x + 7 students (total number of students)
8m + 1 = 2x + 7 (1 student left over)
Solving for x using x = 25 gives 8m + 1 = 2(25) + 7 = 57, so m = 7. Therefore, there are 2 groups of 8 with 1 student left over, and the rest of the students form 7 groups of 8.