Suppose you have $B$ balls in $C$ colours, with $b_j$ balls of colour $j$, and draw $E$ balls. For any subset $S$ of $\{1,2,\ldots, C\}$, let $b_S = \sum_{j \in S} b_j$. The
probability $P(S)$ that you get all the balls of all the colours in $S$ is $0$ if $E < b_S$ and ${{B-b_S} \choose {E-b_S}}/{B \choose E}$ if $E \ge b_S$. By the inclusion-exclusion principle, the probability that you get all the balls of at least one colour is
$ \sum_S (-1)^{|S|-1} P(S)$, where the sum is over all nonempty subsets $S$ of $\{1,2,\ldots, C\}$ with $b_S \le E$.
$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.
Best Answer
Consider the last ball drawn. It will be green with probability $\dfrac{g}{r+b+g}$, noting that the probability for the last ball is the same as the probability for the first. Similarly, the probability the last ball is blue will be $\dfrac{b}{r+b+g}$
Given that the last ball is green, the probability that there is at least one blue after the last red is going to be the probability the last ball if we were considering only the red and blue balls and ignoring the greens will be $\dfrac{b}{r+b}$. A similar argument is made in the other case.
Our probability is then:
$$\left(\dfrac{g}{r+b+g}\times \dfrac{b}{r+b}\right) + \left(\dfrac{b}{r+b+g}\times \dfrac{g}{r+g}\right)$$
or if desired to rearrange, could write it as something like $\dfrac{bg}{r+b+g}\left(\dfrac{1}{r+b}+\dfrac{1}{r+g}\right)$