Average is take by adding all the terms together and dividing by the number of terms. In this case it terms is people in the room.
22= (25+18+17+13+24+x)/6
Where 22 is the average age. The numerator is all the known ages added together, plus x which is the age of the person who just entered. Divided by 6 because you are finding the average age of 6 people.
22 = (25+18+17+13+24+x)/6 Multiply both sides by 6
132= 97+ x Subtract 97 from both sides.
35 = x
The person who just entered the room is 35 years old.
look the the left of the column asked for. if it's 0-4 it stays the same but if it's 5-9 it goes up on. e.g if the number was 97508 it would go to 98000