Let probability of a child having genotype AB =p=1/2.
Then probability of a child having genotype BB=1-p=1/2.
Let random variable X = number of children having genotype AB in 5 children i.e. in 5 trials
X∼B(n,p),n=5,p=1/2
P(X=2)=(52)(21)2(1−21)5−2=2!3!5!⋅321=165
Comments