The essence of Islam is to have sincere trust in God, believe in all the prophets, follow God's command and be just and fair to all the creations of God almighty, and desist from doing things harmful to any person, nation or people. It is the mercy from God to get Islamic-teachings, through which Muslims develop sense of justice, freedom, decency and kindness.
Western powers should encourage Muslim nations to establish many more universities, technical-Institutions and industries to engage the youths in serious business of career-building. Once no exploitation is there, democratic process established education is widely available, prosperity comes to their door-steps; this means there is no room of terrorism for the Muslim youths. No other way is better than this to eliminate or erase terrorism, no matter how much resources and manpower you put to action to stop this menace of the greatest concern.