the 5 digit number can't begin with a 3 as there aren't any possible permutations of pairs of digits that each differ by 3 .
So try 4 next as the first digit of the 5 digit number. (We know number can't start with 5 because that would give a number >50000 and any 4 digit number we subtract fro it would give an answer of over 40,000)
In the units columns we can't have 7,4 or 4,1 because the 4 has gone. So that leaves 9,6 or 8,5 or 6,3 or 5,2.
Tried 8, 5 in units column. Then tried 6,3 in Tens column.
That left 1,2,7 9. No differences of 3 existed but as 12-9 is 3 I knew one column could have 2,9 as the pair (knowing I'd have to borrow a 10 to make the 2 into 12).
So tried 2,9 as the pair in the HUNDREDS column.
That left 1 and 7 for the thousands column. And that all worked out.
Bit of trial and error so there may be other solutions- in fact grascarp found another.