You can write it down. $45XX$ where X is a number from $0-9$ but not 4 or $5$.
There are $\frac{4!}{2!\cdot 1! \cdot 1!}=12$ ways of arrangments. And for $XX$ you have $8\cdot 8 =64$ arrangements. In total $12\cdot 64=768$. This is equal to your first summand.
If do not count combinations with leading zeros you have to substract them.
One leading zero:
We have $04X5, 05X4, 045X, 054X$ ($0$ is fix).
There are $4\cdot 8=32$ ways of arrangements.
Two leading zeros
The are only two possible numbers: $0045$ and $0054$
In total we have $768-32-2=768-34=734$