$1.$ With replacement: There are three ways this can happen, red, red, red; blue, blue, blue; and green, green, green.
The probability of red, red, red is $\left(\dfrac{5}{19}\right)^3$. Find similar expressions for the other two colurs, and add up.
$2.$ Without Replacement: The probability of red, red, red is $\left(\dfrac{5}{19}\right)\left(\dfrac{4}{18}\right)\left(\dfrac{3}{17}\right)$. Find similar expressions for the other two colours, and add up.
Remark: We could also do the problem by a counting argument. Let's look at the first problem. Put labels on the balls to make them distinct. Then for with replacement, there are $19^3$ strings of length $3$ of our objects. (The three objects in the string are not necessarily distinct.) All of these $19^3$ strings are equally likely.
There are $5^3$ all red strings, $11^3$ all blue, and $8^3$ all green. This gives probability $\dfrac{5^3+6^3+8^3}{19^3}$.
One can do a similar calculation for the without replacement case.
For without replacement, there is a third approach. We can choose $3$ objects from $19$ in $\dbinom{19}{3}$ ways. And we can choose $3$ of the same colour in $\dbinom{5}{3}+\dbinom{6}{3}+\dbinom{8}{3}$ ways.
Randomly select an urn, draw a ball without replacement, then again randomly select an urn and draw a second ball. Let $D_n$ be the colour of the $n^{th}$ draw, and $U_n$ be the urn from which it is drawn.
Using k for black, the urns are: $a = \{(w,4), (r,2)\}, b = \{(r,3), (k,3)\}$
Now, if we know a black ball is going to be removed in the second draw, then only one of the other two black balls, or one of the three red balls, could be removed from the second urn during the first draw.
So the probability of drawing a red ball in the first draw give that knowledge is:
$$P(D_1=r \mid D_2=k) \\ = P(D_1=r \cap U_1=a \mid D_2=k)+P(D_1=r \cap U_1=b \mid D_2=k) \\ = P(U_1=a)P(D_1=r \mid U_1=a \cap D_2=k)+P(U_1=b)P(D_1=r \mid U_1=b \cap D_2=k) \\ = \frac{1}{2}\frac{2}{6}+\frac{1}{2}\frac{3}{5} \\ = \frac{7}{15}$$
Best Answer
"Without replacement" may mean "all at the same time" or it may mean "draw one by one without replacing." Either way gives the same result.
"With replacement" would be "draw one, add a tally, return to the urn, then draw again"
Your formula is correct. All that remains is how you measure the probabilities for drawing "without replacement".
So... How will you measure the probabilities for drawing "without replacement"?
$\mathsf P(W\mid U_1) = $ the probability of selecting $5$ of the $25$ white out of all ways to select any $5$ of all $40$ (without replacement).
$\mathsf P(W\mid U_2) = $ the probability of selecting $5$ of the $15$ white out of all ways to select any $5$ of all $40$ (without replacement).