How you count the average age for people is: (age of person 1 + age of person 2 ... ) / number of people = average age
Let's start by observing that we've got 2 equations coming from the text:
average of just students 20 students x 11 (average for a student) = sum of age of students 20 x 11 = 220
average of student and teacher let's say x is age of teacher together students & teacher is 20 + 1 = 21 people (20 students x 11 + x)/ (20 + 1) = 12 (220 + x) / 21 = 12 220 + x = 12 * 21 x = 12 *21 - 220 x = 252 - 220 x = 32