What you should do is express the question in terms of modula arithmetic then use the Chinese Remainder Theorem.
However we can derive the answer without explicitly using it.
be the number of cars. The second and third pieces of information say that if we divide by 5 or 4 we get a remainder of 1. So
must be divisible by 4 and 5, so
must be a multiple of 20. This means
for some integer
. The fourth piece of information says
is a multiple of 9. We can always write
is the quotient and
is the remainder when we divide
by 9 (note that
are integers and furthermore
is 0,1,2,...,or 8 ). Putting all this together tells us that
is a multiple of 9. Clearly 180q is a multiple of 9 and since the entire expression is a multiple of 9 we know
is a multiple of 9. Checking the 9 possible values of
(i.e. 0,1,...8 ) we find the only time when 20r+1 is divisible by 9 is when
It is easy to check that regardless of the value of
has remainder 1 when divided by 4 and 5 and remainder 0 when divided by 9.
Since we know the numbers of cars is less than 1000, the number of cars must be
81, 261, 441, 621, 801, 981
Hope this helps,