Kim noticed Deanna's Early Bird badge, which meant she'd been the first one to reach the kitchen in the morning. But Deanna told Rachel that she'd come from the cabins just a few minutes earlier and met Dwight in the rec room. That didn't sound convincing. Also, Deanna said she hadn't seen what was written on the whiteboard, and all Rachel said was that someone had written lies about her, but Deanna told Mr. Baird that the message was about Rachel's learning disability. Kim realized that Deanna must either have written the message or been in on the secret about it.
And since Deanna got the Early Bird Award on the morning when Rachel told Dwight about her reading problems, Kim figured Deanna had had a chance to overhear their conversation.