18*35 - number of the students at school.
x- is a number of classes if it is going to be 30 students per class, then
30x - number of the students at school.
So,
18*35 = 30x
x=(18*35)/30 = 21 classes should be if it is going to be 30 students per class.
21 - 18 = 3 new classes must be formed.