Let us look at the experiment mentioned in the question. We are throwing a pair of dice and we are repeating that 5 times. The event we are interested in is getting a doublet two times.
When we throw a pair of dice, what is the probability of getting a doublet? Any pair of the form (x,x) is a doublet. There are 6 possible doublets and 36 possible outcomes when we throw a pair of dice. So the probability of getting a doublet would be 636=16
We want to find the probability of getting doublet in 2 out of the 5 trials. This is same as finding probability of r successes in n trials, which would be equal to nCrprqn−r, where p is the probability of success and q is the probability of failure. In our example, p=16 and q=56
So the probability of 2 successes(two doublet) in 5 trials is given by 5C2(16)2(56)3
=6253888
⇒ 3888 P(A)= 625