Lets find how many boys there are.
First we add the ratios:
7 + 5 = 12
Then we divide the total number of students by this:
240 / 12 = 20
Now to find out how many boys there are, we times this by the ratio of boys:
20 x 5 = 100
Finally we divide the number boys, by the total number of students. We then times this number 100 to change it from a decimal to a percentage.
100 / 240 = 0.41666 (Multiply this by 100 to get the percentage)
0.41666 x 100 = 41.67%