Solution:
Concept: When two experiments are done one after the other, a combined outcome is the ordered pair (first result, second result). Because the first ball is put back, the second draw again has all three colours available.
Write R for red, B for blue and Y for yellow.
Step 1 — Part (i): draw the space diagram. We put the colour of the first ball along the horizontal axis and the colour of the second ball up the vertical axis, and mark one dot for each pair:

Step 2 — Part (i): draw the tree diagram. The first set of branches shows the first ball; from the end of each, three branches show the second ball:

Step 3 — Part (ii): list and count the outcomes. Reading the diagram gives the combined outcomes:
(R,R),(R,B),(R,Y),(B,R),(B,B),(B,Y),(Y,R),(Y,B),(Y,Y)
Each of the 3 colours for the first ball can go with each of the 3 colours for the second ball, so there are 3×3=9 combined outcomes. They are equally likely because each ball is equally likely to be selected on each draw.
Therefore, the combined outcomes are (R,R), (R,B), (R,Y), (B,R), (B,B), (B,Y), (Y,R), (Y,B), (Y,Y), which are 9 equally likely outcomes.