Let's suppose you abuse children, and at the same time demand tougher sentences for child abusers. The tu quoque fallacy would be for me to say "But you abuse children yourself, so child abusers should actually be let off." A more defensible response would be "I agree, and you should suffer the same penalties."
Now, let's say a group of Islamic Jihadists are terrorists, and the United States claims that they should be punished for their actions. If you were to say, "But the United States carries out acts of terrorism too, so the Jihadists shouldn't be punished," that would be the tu quoque fallacy.
That's how it works. And what's interesting is that, in framing your incorrect example of the tu quoque fallacy, you are actually committing a tu quoque fallacy.
Dave