United States cannot win by military action in Pakistan or Afghanistan because it is seen as an invader and an occupation force trying to take over and control Muslim lands. Pakistan and Afghanistan cannot win as long as they are seen fighting America’s war.
Drone attacks are only providing successful recruitment to the bad guys by heavy collateral damage and deaths of civilians.
It will be far more effective if United States lets Pakistan and Afghanistan fight for their own survival but gives both countries latest tools, equipment and training to both military and the police.
In addition immediate massive economic assistance to Pakistan to repay the losses in billions Pakistan has been suffering for decades due to United States actions in the region.