Let's read this in a more proper way.
The number of boys in Mr. Watson's class is 2/3 the number of girls. So:

There are 30 students in Mr. Watson's class.
For this ratio to be in true in the second problem (306 boys, 459 girls), 306 must be 2/3 of 459.

The ratio holds true for the second problem.
30 students,
Yes it is possible, because 306 is 2/3 of 459.