CASE (i)

suppose the three balls bearing the same number bear the number 1.

there are four subcases:

1) those three balls are B,R,G

2) those three balls are B,R,W

3) those three balls are R,G,W

4) those three balls are B,G,W

for subcase 1) there are 36 possible choices. (why?)

So for CASE(i) there are 4*36 choices.

Hence the total number of choices are 4*10*36.