In how many ways can 3 identical red balls, 3 identical green balls, and 3 identical blue balls be arranged in a 3 by 3 grid, such that each row and each column of the grid contains 1 ball of each color?
I am stuck, I had gotten 108 but that was not the answer. I got it by: I got 108 by drawing a grid with 3 choices for the top left corner, 2 for the ones on the right and the one below. After that, there are 2 choices for the one in the middle. This gives 3*2*2*2 = 24. You can then rearrange these possibilities to get a total of 108.
Suppose that the balls in the first row are R,G,B in that order. The two remaining red balls must either go in the $(2,2)$ and $(3,3)$ positions, or they must go in the $(2,3)$ and $(3,2)$ positions. In either event, there is exactly one way to fill in the remaining positions. Now we can permute the colors to get $6\cdot2=12$ arrangements.