It's difficult but not impossible. The Taliban and sympathizers simply live in their homes and neighborhoods/villages when they are not out fighting the Afghan government and US/NATO forces. It's their country. The US/NATO are propping up a government in what is eseentially a civil war that spans two countries.
If one calls in an AC-130, one is going to kill civilians. The US and NATO forces need to be smarter.
Meanwhile Pakistan and Afghanistan go hand in hand because the Pahstuns (e.g. Waziri) straddle the border.
Intelligence report: U.S. antiterror ally Pakistan 'on the edge'