Let, the event of getting a yellow marble be Y.
And the event of getting green marble be G.
Then, n(Y) = 10, n(G) = 12
And the total number of marbles = 10 + 12 = 22
A probability tree diagram when two marbles are drawn randomly in succession without replacement is given below.