The ratio 1:8 means there are 9 items and the ratio splits them into 1 and 8. Similarly the ratio 2:7 means there are 9 items and the ratio splits them in to 2 and 7. The items are students, and there are 18 of them. Last time there were 8 times as many high school students as there were middle school students, so we know that for every 9 students 1 is a middle school student, meaning last year there were 2 middle and 16 were high school students. This year the ration is 2 out of 9, so there are 4 middle and 14 high school students. That's 2 fewer high school students than there were last year.