Using modular arithmetic, we can create three "equations."
n≡5(mod9)
n≡2(mod7)
n≡4(mod5)
from the last equation, we get that n=5a+4 for some integer a. From the middle one, we get n=7b+2 for some integer b. Set these equal to each modulo 5 to get that5a+4≡7b+2(mod5). you get that 2b≡2(mod5), so b≡1(mod5). So, b=5c+1 for some integer c and the bottom system simplifies to 7(5c+1) + 2 = 35c+9, so n≡9(mod35).
We do the same with this and the top equation we left out before to get that n=315e+149 for some integer e. e=3 minimizes the four digit integer, and we get n = 1094.
hope this helped 