In a term of six if five boys are to be selected then both A and D together are selected.
If C is selected, a girl Q will be selected.
From B and E, one has to be selected. So, we select E because B will be accompanied by a girl.
The fifth boy will be F. So, the only girl will be Q in the team A C D E F G.
Hence, the answer is (b).