I can't interpret #1 unless it contains a typo. First it says how many four digit numbers and then composed of three distinct digits, suggesting that a maximum of one repeat is allowed. Then #2 says with repeated digit, which seems to me the exact same question as #1???
Can I assume that the poorly worded #1 means to ask "How many four-digit numbers with distinct digits are possible..." ???
Anyway, the question #1 is equivalent to solving in where for all , and then taking every possible reordering of these digits as long as the leading digit is nonzero. Question #2 is the same, except removing the criteria that each value must be distinct.
To be honest, I don't see a "clever" way to do this. The brute-force method would be listing out all the solutions to the equation, eliminating the ones with repeated digits, multiplying by the 4! different orderings, and individually eliminating solutions with a leading zero. Similar approach for #2...