A ratio can be expressed as a fraction.
Using 'g' to represent the number of girls and 'b' to represent the number of boys, the ration of boys to girls is b / g.
The ratio of boys to girls is 2:7 becomes: b / g = 2 / 7
Since there are 250 more girls than boys: g = 250 + b
Substituting the second equation into the first: b / (250 + b) = 2 / 7
Cross multiply: b · 7 = 2 · (250 + b)
Multiply out: 7b = 500 + 2b
Subtract: 5b = 500
Divide: b = 100 ---> g = 250 + b --> g = 250 + 100 ---> g = 350
Check: b / g = 2 / 7 ---> 100 / 350 does reduce to 2 / 7.