If the ratio is 4 to 5, we know there are 4 boys for any 5 girls.
In the dance, there are 35 girls.
We can calculate the number of boys as:
There are 28 boys.
We have just multiplied the ratio by the number of girls.
Other way to solve it is by dividing the number of girls in groups of five (there would have been 35/5=7 groups), and multiply this number of groups by the amount of boys per group (in this case, 4 for each group of 5 girls).
Then, we would have 7 groups multiplied by 4 boys per group and we get 7*4 = 28 boys.