See the attached image. The tree should consist of paths (left-to-right) that exhaust all the possible arrangements. 3 choices for the first bag (R, G, or B), 2 choices for the second (color availability depends on the first bag), and 1 for the third (again dependent on previous color), so there are
possible arrangements/permutations.