Solution:
Key idea: Split each event by the colour of the ball from bag A. The ball from bag A and the pair from bag B are independent, and the pair from bag B is counted with combinations, since two balls taken together form an unordered pair.
Step 1 — Part (i): count the pairs from bag B.
Bag B has 3 red and 5 green balls, 8 in all, so the number of equally likely pairs is 8C2.
8C2=28
Step 2 — Part (i): red from A, then one red and one green from B.
Bag A gives red with probability 85. Bag B then must give one red and one green, which can be chosen in 3C1×5C1=15 ways.
P1=85×2815
P1=22475
Step 3 — Part (i): green from A, then two red from B.
Bag A gives green with probability 83. Bag B then must give two red balls, which can be chosen in 3C2=3 ways.
P2=83×283
P2=2249
Step 4 — Part (i): add the two cases.
The two cases cannot happen together, so we add them.
P=22475+9
P=22484
P=83
Step 5 — Part (ii): count the pairs from bag B.
Bag B now has 2 red and 3 black balls, 5 in all, so there are 5C2 equally likely pairs.
5C2=10
Step 6 — Part (ii): red from A, then two black from B.
Bag A gives red with probability 83, and bag B gives two black balls in 3C2=3 of its 10 pairs.
P1=83×103
P1=809
Step 7 — Part (ii): black from A, then one red and one black from B.
Bag A gives black with probability 85, and bag B gives one red and one black in 2C1×3C1=6 of its 10 pairs.
P2=85×106
P2=8030
Step 8 — Part (ii): add the two cases.
Again the two cases are mutually exclusive, so we add them.
P=809+30
P=8039
Therefore, (i) the probability of two red and one green is 83, and (ii) the probability of two black and one red is 8039.