We are told that, out of 30 students of Mary's class, 6 of them work after school.
Thus the ratio of students who work after school to the total students is

If there are 525 students in the school, the number of students who work after school should be 1/5 of this number, thus the number of students who work after school should be;

Thus it should be 105 students.