Average age of 40 pupils (= 10.5)
So, total age of pupils:
40×10.5=420
When the teacher is included, the average increases by 5:
10.5+5=15.5
Now total persons (= 41)
Total age including teacher:
41×15.5=635.5
Teacher’s age:
635.5−420=215.5
So, the age of the class teacher is 215.5 years, which is not realistic.
This means the question likely has a mistake.
If the intended statement was “average increases by 0.5”, then:
41×11=451
Teacher’s age:
451−420=31
So the likely correct answer is 31 years.