Think of it this way:
You are trying to make a ratio to the months with thirty days and the ones who don't.
So,
there are 4 months a year with 30 days.
That means that there are 12-4= 8 months a year that are not 40 days.
It said the months to 30 days first in the problem.
4:8
Divide each side by 4, since both are divisible by 4.
1:2
For every one month of 30 days, there are 2 months that do not have 30 days.
1 to 2 is your answer.
I hope this helps!
~kaikers