The fact that we can assume that there are a non-negative, integer number of both boys and girls makes this a finite problem. That is, we could in principle check every possible case by hand. We can reduce our task if we make a couple of basic observations:
$B$, the number of boys, must be divisible by $4$. If we list the pairs $(B,G)$ we get $$(4,38),(8,34),(12,30),(16,26),(20,22),(24,18),(28,14),(32,10),(36,6),(40,2)$$ SImilarly, $G$ must be divisible by $3$ and we see that only $(12,30),(24,18),(36,6)$ are candidates. And it is easy to check that only $\boxed {(24,18)}$ gets the job done.
You can speed this up by remarking that, since $42$ and $G$ are both divisible by $3$ then $B$ must be as well. Hence $B$ is divisible by $12$ so we get down to three cases instantly.