<s>[INST] A box contains 7 white and 5 black balls. A box contains 7 white and 5 black balls. If 3 balls are drawn simultaneously at random, what is the probability that they are not all of the same colour? Calculate the probability of the same event for the case where the balls are drawn in succession with replacement between drawings.
Probability that they are not all of the same colour $$= \frac{^7C_2\times ^5C_1}{^{12}C_3}+\frac{^5C_2\times ^7C_1}{^{12}C_3}=\frac{35}{44}$$
For the second case, I did it like:
Probability that they are not all of the same colour where the balls are drawn in succession with replacement between drawings $$= \frac{7^2\times 5}{12^3}+\frac{5^2\times 7}{12^3}=\frac{35}{144}$$
But in my book the answer is $\frac{35}{48}$.
 [/INST] How about counting the complementary event--i.e., the three balls drawn are of the same color?  This seems easier.  There are two mutually exclusive cases:  either all the balls drawn are white, or they are all black.  In the first case, there are clearly $$\binom{7}{3} = \frac{7!}{3! 4!} = 35$$ ways to pick three white balls.  In the second case, there are $$\binom{5}{3} = \frac{5!}{3! 2!} = 10$$ ways to pick three black balls.  Since there are $$\binom{5 + 7}{3} = \frac{12!}{3! 9!} = 220$$ ways to pick any three balls, the complementary probability of getting all the same color is $$\frac{35 + 10}{220} = \frac{9}{44},$$ thus the desired probability of different colors is $$1 - \frac{9}{44} = \frac{35}{44}.$$  This matches your computation.
When balls are drawn with replacement, we again count the complementary outcomes, but the computation is different because the outcome of each draw is independent and identically distributed.  In each of the three draws, the probability of obtaining a white ball is $7/12$.  So the probability of getting three white balls is $$(7/12)^3 = \frac{343}{1728}.$$  Similarly, the probability of getting three black balls is $$(5/12)^3 = \frac{125}{1728}.$$  So the total probability of getting the same color in three draws is $$\frac{343 + 125}{1728} = \frac{13}{48},$$ and the desired probability of getting both colors in three draws is $$1 - \frac{13}{48} = \frac{35}{48}.$$  So your book is correct for this second scenario.
Where did you go wrong?  The issue is that the probability of getting, say, two white balls and one black ball is not simply $$\frac{7^2 \cdot 5}{12^3}.$$  The actual probability is three times this, because the outcomes can be ordered; e.g., $$\{w, w, b\}, \{w, b, w\}, \{b, w, w\}$$ are all distinct outcomes.  Therefore, you will find that if you multiply your answer by $3$, you get the book's answer:  $$\frac{35}{144} \cdot 3 = \frac{35}{48}.$$
Another way to reason about this is to note that when the number of draws is fixed--in this case, $n = 3$ draws--then the number of white balls drawn determines the number of black balls drawn.  For instance, if you draw three balls with replacement, saying you got exactly two white balls is the same as saying you got exactly one black ball.  Or if you got zero white balls, this is the same as saying you got three black balls.
So, to say that you got balls of both colors is equivalent to saying you got either $1$ or $2$ white balls, no more, no less.  So the random number $X$ of white balls is a binomial random variable with $n = 3$ and probability of drawing a white ball $p = 7/12$; i.e., $$\Pr[X = x] = \binom{n}{x} p^x (1-p)^{n-x} = \binom{3}{x} (7/12)^x (5/12)^{3-x}, \quad x \in \{0, 1, 2, 3\}.$$  Thus we have $$\Pr[X = 1] + \Pr[X = 2] = \binom{3}{1} \frac{7^1 5^2}{12^3} + \binom{3}{2} \frac{7^2 5^1}{12^3} = \frac{35}{48}.$$
</s>