Let's try and put this in better English and with a better explanation.
First of all you need to do this in two stages
1. 3 of a kind plus 3 singletons
2. 2 doubletons and 2 singletons
1. There are 4 possible 3s + 3 singletons. These are
111234, 122234, 123334, 123444
But then we need the permutations for each of these sets of 4
If all numbers had been different, then there would have been 6! = 720 permutations. BUT they are not all different. In that total of 720 you need to divide by 3! = 3 * 2 * 1 = 6 in respect of the identical permutations given by just swopping over the identical numbers.
eg for 111234 if we swop the ones for abc the permutations would consist of abc234, acb234,bac234,bca234,cab234,cba234
These 6 permutations are all identical
Therefore there are 6!/3! = 720/6 = 120 permutations for each of the 4 ways you can select a 3 of a kind plus 3 singletons
Total stage 1 = 4 * 120 = 480
Stage 2 = 2 doubletons and 2 singletons
There are 6 ways that you can select 2 doubletons and 2 singletons
112234,113324,114423,223314,224413,334412
Again if all different there would be 6! = 720 permutations for each
However we must divide by 2 for the first doubleton for the duplication of swopping one of the doubleton numbers for the other, and divide by a further two for swapping the second doubleton number for its twin.
Therefore 720/2/2 = 180
As there are 6 different ways for 2 doubletons and2 singletons and each has 180 permutations, the total permutations for 2 doubletons and 2 singletons = 180 * 6 = 1040
Adding the two stages together
Total answer = 480 + 1040 = 1520
6! / 3! = 6 * 5 * 4 = 120
120 * 4 = 480
2 2 doubletond + 2 singletons
eg 112234, 113324,114423,223314,224413,334412
Rgen the permutions 6!/2/2 = 180
6* 180 = 1040
Total =480 + 1040 = 1520