Assuming draws w/o replacement based on the answers given, and I'll focus on the second question to form an example for others. Let $B$ be the chosen box ($x$ or $y$), the probability of selecting box $x$ in case we draw two white balls is as follows:
$$P(B=x|2W)=\frac{P(2W|B=x)P(B=x)}{P(2W|B=x)P(B=x)+P(2W|B=y)P(B=y)}$$
Here, $P(B=x)=P(B=y)=1/2$, so they cancel each other in numerator and denominator. And, $P(2W|B=x)$ is choosing two white balls when the box is $x$. There are two ways to think:
- Probability of choosing the first balls as white, and then choosing the second ball as white, which is:
$$P(2W|B=x)=P(W_1|B=x)P(W_2|B=x,W_1)=\frac{3}{10}\times \frac{2}{9}$$
This way, we'll have $P(2W|B=y)=\frac{7}{10}\times\frac{6}{9}$, and therefore:
$$P(B=x|2W)=\frac{{3\over 10}\times{2\over 9}}{{3\over 10}\times{2\over 9}+{7\over 10}\times{6\over 9}}=\frac{1}{8}$$
- There are ${3 \choose 2}$ ways to choose white balls from box $x$, and ${10\choose 2}$ ways to choose any two balls from it. So, the probability of choosing two white balls is ${3\choose 2}/{10\choose 2}$. This is similar for box $y$, with numerator being equal to ${7\choose 2}$ and the denominator is the same since we have 10 balls in it, too.
$$P(B=x|2W)=\frac{{3\choose 2}/{10 \choose 2}}{{3\choose 2}/{10 \choose 2}+{7\choose 2}/{10 \choose 2}}=\frac{{3\choose 2}}{{3\choose 2}+{7\choose 2}}=\frac{1}{8}$$