This is a simple yet standard GCSE question, especially in non-calculator papers. The solution is simple: if the student is picked at random, then the probability 2/5 must represent a ratio where the other side is completed by the probability of that student not being female. This gives the ratio 2:3 (female:male). With 174 male students, we can divide by 3 to find the appropriate ratio of 2*(174/3):3*(174/3) giving us 116:174 which holds. Therefore the total number of students in the school is simply 116 + 174 which is 290. The simpler way is simply doing 174 / (1 - 2/5) which yields the same answer.