Simplified :
Use IODB template for these kind of problems
Assume X1 ,X2,X3 are the noof 1's,2's,3's in the resultant number .
Then according to question we have to choose a 4 digit number , so the equation becomes
X1+X2+X3=4 ( X1,X2,X3>=0)
noof solutions for that equation can be easily found . (6c4=15)
For every possible solution there is only one possible non decreasing order ( assume X1=2,X2=1,X3=1 ---> so only possible ordering to this soln is 1123).
So noof orderings possible is 15