It might help your intuition to do a couple of these type of problems "by hand", without looking at modular inverses etc, just to get a feel for what is going on, before learning the techniques given in Chinese Remainder theorem discussions.
So looking at some small numbers $a$ where $a\equiv 4 \bmod 5$:
and some numbers $b$ where $b\equiv 0 \bmod 9$:
You can see the two matches in the lists of $9$ and $54$, and it shouldn't be surprising that they are $45$ apart, since the remainders of any number with respect to $5$ and $9$ will not be changed by adding a number that is a multiple of both $5$ and $9$. Since $45$ is the least common multiple of $5$ and $9$, this is the modulus to resolve into. And there will be exactly one common value less than this (if there is a solution at all, which there always will be when the original moduluses are coprime). This is fairly easy to satisfy yourself of by trying a few different cases in a small example like this.