We have to select 5 people for the group. The condition is that we need at least one girl and one boy for the group.
So what we need to do is to find the groups which does not satisfy the condition and substract it from the total number of groups to get the groups which contains at least a boy and girl.
There are two teams that will violate the above given condition.
- The team with only with boys
- The team only with girls
We have 7 boys and 5 girls.
Ways to form a girls only team `= ^5C_5 = 1`
Ways to form boys only team`= ^7C_5 = 21`
Total ways to get 5 member team from 12 `= ^7C_5 = 792`
Teams with at least a girl and boy `= 792-21-1 = 770`
So there are 772 ways to select a team with at least a boy and girl.