Since the numbers have to be greater than 5000, we have to choose either 5 or 7 as first digit.
If we choose 5, we can arrange the remaining 3 digits in 3!=6 ways:
5047, 5074, 5704, 5740, 5407, 5470
All these numbers are something like "five thousand and something", so they are greater than 5000.
Similarly, if we choose 7, we can arrange the remaining 3 digits in 3!=6 ways:
7045, 7054, 7504, 7540, 7405, 7450
All these numbers are something like "seven thousand and something", so they are greater than 5000.