Consider four blanks
__ __ __ __
\(7\) is in thousand place, then \(3\) can be placed in any of the \(3\) places in \(3\) ways.
Remaining two blanks can be filled with remaining eight digits in \(^8P_2\) ways.
The number of numbers that have \(7\) is in thousand place is \(3×{^8}P_2=168\)
Thousand place cannot be \(0,7\) and \(3\), it can be filled with remaining \(7\) digits in \(7\) ways.
In remaining \(3\) blanks, \(7\) and \(3\) can be arranged in \(3\) ways.
Fourth blank can be filled in \(7\) ways.
The number of numbers that are formed where \(7\) and \(3\) is not in thousand place is \(7×3×7=147\).
Hence total required numbers = \(168+147 = 315\)
According to the question,
Case 1: When \(7\) is at the left extreme
In that case, \(3\) can occupy any of the three remaining places and the remaining two places can be taken by \((0,1,2,4,5,6,8,9)\)
Hence, total ways \(3×8×7= 168\)
Case 2: When \(7\) is not at the extremes
So, there are \(3\) cases possible and the remaining two places can be filled in \(7×7\) ways.
(Note: \(0\) can't come on the extreme left)
Hence, total \(3×7×7=147\) ways
Therefore, Total ways \(168+147=315\) ways
So, the answer is \(315\) ways.