by helping the muslims who aren't radicals. and i don't mean help as in give them weapons. i mean help by giving them food and water, education, medical assistance. teach them that we're their friends. it takes a LOT of effort and a long time before it really starts working but it's the only way. and whenever there's a terror attack we should focus on the good things that people who live there do. helping each other, grieving with each other. and then ignore the terrorists. a week after it happens don't mention it again. don't make a big deal out of it. the same way we should handle mass shootings that happen in the US.
these events are dreadful of course but realistically they don't really affect that many people. even 9/11 which caused nearly 3000 deaths isn't that many deaths in the grand scale of things. by overreacting to these things we play right into the terrorist hands.
After what western 'intervention' has done to their countries, I doubt a school and a glass of water's gonna cut it.
The civilians have suffered those most in these regions after all.