We created Taliban to fight USSR so that we don't have to fight them on our soil. Project was a success as everyone knows , what we didn't do is that we should have disarmed them , help Afghanistan build a public representative govt , but it all was never possible as India started funding communists and Northern Alliance and you had a civil war where N.A was kicked out , Talibs were victorious then Americans Invaded , started funding factions of Talibs to fight Pakistan , India joined in.
Now i know you are confused because the situation is pretty confusing , you have groups calling themselves Taliban in Afghanistan and in Pakistan. One side is funded fully by the US and India to create devastation in Pakistan which has been successful considering that 35,000 Pakistanis are not breathing anymore. Pakistan in response will not allow its proxies in Afghanistan to come to the table , not until we reach a time when we could bargain a solution which see India getting a kick from Afghanistan , current govt gone and a new Govt in Afghanistan post NATO withdrawal which guarantees safety on the western border , takes all of their refugees back and does not allow its soil to be used against Pakistan by India.
Until that happens Pakistan won't back down because we do not wish to be surrounded by India on the east and its stooges on the west , especially not when we are in the driving seat and can change circumstances the way we want pretty much. So Americans , Indians and their buddies in Kabul have gotten frustrated , they have turbocharged infiltration from Afghanistan using TTP and any tactic possible , which would be of no use because we can throw a bone to America and pull them our side at anytime , everyone knows they are pretty good at that.
So enjoy the saga as it unfolds , the very fact that TTP has to find sanctuaries inside Afghanistan is evident that Army has kicked them where it hurts the most already and now they are implying plan B and assessing a plan C.