It didn't seem like there was ever any explanation as to how the Yeerks suddenly knew, other than some speculation about them always leaving blood behind at battles. When Rachel scares off the two thugs working for David, she's concerned that they'll tell their story where a Controller will hear, and the Yeerks will find David and get information from him. This is why she decides that she has to do something about David (what this something is, of course, is left ambiguous). However, she doesn't seem to do anything about, or even mention, the fact that their story also includes a girl who can turn into a rat and a bear, with nary a mention of freaky blue centaurs. Also, while she says there's no threat of Visser One recognizing Super-Rachel as one of the Andalite bandits, it's possible that his encounter with her could make him more open to the possibility that the bandits are human, at least subconsciously. Also, I posted this before, but Rachel unintentionally took Crayak's deal."If you ever find yourself desperate, Rachel. At an end. In need. Remember this: Your cousin's life is your passport to salvation in Crayak.[spoiler]Rachel killed Tom.[/spoiler]
Note: This is something I found on TV Troupes. It isn't my own theory, but I liked it and wanted to share it