Why did Carnation kill Katniss

How did Thresh know Katniss befriended Rue in Hunger Games?

From the transcript:

Clove: Well, it's a shame you couldn't help your little friend. The little girl ... what's her name again?
Clove: Rue?
Clove: Yes. Well we killed her. And now ... we're gonna kill you ...
[Thresh pulls Clove from Katniss and tucks her by the neck against the cornucopia]
Thresh: You kill her?
Clove: No!
Thresh: I hear you!
Clove: Cato!
Thresh: Call her name!
Clove: Cato!
Thresh: Say her name! [Slaps Carnation against the wall until she dies]
Thresh [to Katniss]: Only twelve this time. For Rue!

The entire dialogue section takes place within 20 seconds. Thresh grabbed Clove within 4 seconds of saying. The dialogue in which Thresh asks Clove if she [rhetorically] killed him, is muffled by Clove screaming for Cato. So if you listen first you might miss it, but it's clearly there. See the clip below.

Between Clove's words and the concept of the alliances the Tributes were trained to form, Thresh clearly knew what had happened.

The scene plays a little differently in the book . He asks Katniss what Clove first said before deciding to give her a one-time pass:

“Forget it, District 12. We're going to kill you. Just like we did to your pathetic little ally. . . how was her name? The one who hopped around in the trees? To regret? Well, rue first, then you, and then I guess let's just let nature take care of Lover Boy. How does that sound? "Asks Carnation." Well, where do I start? "

[Carnation plays with her prey, Thresh pulls her up]

When he screams, I jump without hearing him speak over a murmur. “What did you do with the little girl? You kill them "Clove crawls backwards on all fours like a wild insect, too shocked to even call Cato." No! No, it wasn't me! "" You said her name. I heard you. You kill her? "Another thought brings a new wave of anger to his features. "You cut her up like you were cutting this girl up?"

[Thresh Kills Clove]

If Thresh twirls on top of me with a stone raised, I know it's not good to run. And my bow is empty, the last arrow loaded went in Cloves direction. I am caught in the glow of his strange golden brown eyes. "What did she mean? About Rue as an ally? "I - I - we got together. Blown up supplies. I tried to save them. But he got there first. District One," I say. If he knows I've helped Rue, maybe he will Don't choose a slow, sadistic ending for me. “And you killed him?” he demands. “Yes. I killed him. And bury them in flowers, ”I say. "And I sang it to sleep." Tears run into my eyes. The tension and the struggle run out of memory when I remember. And I'm overwhelmed by Rue and the pain in my head and my fear of Thresh and the moaning of the dying girl a few feet away. "Sleep?" Says Thresh gruffly. "To death. I sang until she died," I say. "Your district... They sent me bread." My hand reaches up, but not for an arrow that I know I would Just to wipe my nose. "Make it quick, okay, Thresh?" Conflicting emotions cross Thresh's face. He lowers the stone and almost accusingly points at me. "Only this one time did I let you go. For the little girl. You and I will still be. No longer owed. You understand? "