"I am also not sure if it's correct or not."
we have 4 positions to fill. each number can be in any particular position in 3! possible numbers.
e.g. number 7 can be in the most significant place in 3! combinations. 7 _ _ _ .
so, we need to add 7000, 3! times. i.e sum will contain 7000 * 3!.
Similarly other numbers can be in last place, so 3000 * 3! + 2000 * 3! + 5000 * 3!.
or, (7000+3000+2000+5000)*3! = (17000) * 3!
similarly, after considering other positions (tens place, hundreds place, and unit place), we have
sum = (17000 + 1700 + 170 + 17) * 3!
= 18887 * 3! = 113322