Probability formula for this problem Kindly guide me in solving the following problem. I am learning probability so, i would appreciate a bit of explanation. 
There are two men M1 and M2. Each man has got two buckets called A and B. Bucket A contains numbered blocks from 7 to 14. Bucket B contains numbers from 7 to 30.
Now M1 and M2 need to independently select one numbered block from their respective buckets. The probability of selecting bucket A is 0.6 and probability of selecting bucket B is 0.4. Within the bucket all numbered blocks can be picked with equal probability.
I want to know what is the probability that M1 and M2 select an identical numbered block. 
PS: selection of a numbered block by M1 and M2 is independent event (i.e. M1 and M2 have their own buckets.)
A stepwise formulation would be very helpful.
Thanks
 A: You want to calculate the probability $P(M_1=M_2)$. Conditioning on $M_1=x$ for $x\in \{7, \ldots, 30\}$ and using the fact that the events that M1 picks a number $x_1$ and M2 picks another number $x_2$ are independent you have that $$P(M_1=M_2)=\sum_{x=7}^{30}P(M_1=x \mid M_2=x)P(M_2=x)=\sum_{x=7}^{30}P(M_1=x)P(M_2=x)$$ and because the two men are facing equl circumstances you further have that $$P(M_1=x)=P(M_2=x)$$ for every $x$. Thus it suffices to calculate the probability $P(M_1=x)$. 
Of course if $x \notin \{7,\ldots, 30\}$ then it is immediate that $P(M_1=x)=0$. For $x \in \{7,\ldots,30\}$ you have by the Law of Total Probability that $$\begin{align*}P(M_1=x)&=P(M_1=x\mid A)P(A)+P(M_1=x\mid B)P(B)=\\\\&=\begin{cases}\frac{1}{|A|}\cdot 0.4+\frac{1}{|B|}\cdot 0.6,& \text{if } 7\le x \le 14 \\ \phantom{+}0\cdot 0.4+\frac{1}{|B|}\cdot 0.6,& \text{if } 14< x \end{cases}\end{align*}$$ where $|A|=8$ and $|B|=16$ denote the number of elements in each bucket. Thus in total $$P(M_1=x)=\begin{cases}\frac{7}{80},& \text{if } 7\le x \le 14 \\ \frac{3}{80},& \text{if } 14< x \\0, & \text{ else }\end{cases}$$ Thus $$\begin{align*}P(M_1=M_2)&=\sum_{x}P(M_1=x,M_2=x)=\sum_xP(M_1=x)^2\\&=\sum_{x=7}^{14}\left(\frac{7}{80}\right)^2+\sum_{x=15}^{30}\left(\frac{3}{80}\right)^2=8\left(\frac{7}{80}\right)^2+16\left(\frac{3}{80}\right)^2=\frac{67}{800}=0.08375\end{align*}$$
