Jimmy observed the scam on his first visit...
In the scene where Jimmy first visits, he observes Mrs. Kettleman handing a Kettleman check (not an IRS check) to an elderly man, and the man carries it right past Jimmy, who opens the door for the man.
Tax preparers are supposed to take payment ahead of time and file the person's taxes so that the IRS mails their check directly to the customer's home address. Them filing returns and giving the customers a company check for their refund is an obvious scam
He told Kim about it as leverage for a two-part plan (the carrot and the stick) to keep them from reporting to Hamlin that Jimmy is spreading drug rumors about him...
Jimmy needed to prevent the Kettlemans from telling Hamlin that he was slandering him. He developed a two-part plan of positive and negative incentive--the "carrot and the stick" as the old adage goes (and also the title of the episode). The carrot was a payoff. The stick was the threat to report them to the IRS.
We know Jimmy told Kim, because later, when the Kettlemans call Jimmy to complain that he lied to them about their chances with a claim against HHM, Jimmy gets ready to go appease them. He starts taking stacks of money to pay them off and Kim says: "You're going to use the stick, right?" (0:46:05). The "stick" is the threat of reporting them to the IRS (the negative incentive), so the fact that she references this means he told her about the scam. He is taking money as "the carrot," or the positive incentive.
Kim tagged along and used the info to threaten the Kettlemans so she could put a stop to their scamming poor people.
Thinking Jimmy is just going to pay them off, she decides then and there to tag along (Jimmy was originally going alone) so she can ensure they threaten the Kettleman's with an IRS investigation -- "the stick."
When they arrive at the Kettleman's trailer, an elderly woman is coming out carrying another Kettleman check. The camera focuses in on the check in her hand and there is a lingering shot of Kim watching her. This shows Kim seeing evidence of the scam for herself. It also underscores that she is appalled by the Kettlemans taking advantage of elderly people like that and is determined to stop them.
Before Jimmy can hand over the money (the carrot), Kim interrupts and calls the IRS (the stick). Then she leaves. Jimmy was probably feeling a little sorry for them, especially the husband who seems like a nice guy. Kim guessed that Jimmy gave them the carrot too after she left the office and his reaction indicates that he did. Jimmy has more of a soft spot and tolerance for scammers because he is/was one.