what's the Question?
If it is asking the possible no. of total students its
(4:7) × 2 = 8 : 14
in that case total is 8+14 =22
(4:7) × 3 = 12 : 21
in that case total is 12 + 21 = 33
so there's only two possible values for the total no. of students in class ( within the 20 - 40 range )