Afghan Taliban are *very* different from TTP. Whatever one says about the Afghan Taliban, Mullah Omar would never, ever do what these people did in Peshawar, or what they did recently at Wagah. they would never fight the Pakistani Army, whom they consider to be a legitimate Muslim army.
The TTP is a group of conmen who use the name of "Taliban" to give themselves some image of legitimacy as an Islamic movement, even though the Afghan Taliban repeatedly distance themselves from the TTP. They are culturally the same, but the TTP is not a branch or outgrowth of the Afghan Taliban: that is just the image they deceptively project for themselves.
We already know that you guys were getting cozy with the Northern Alliance, and we already know you wanted to get influence in Afghanistan so as to put pressure on Pakistan from the west as well as the east. The Soviet invasion was a threat to Pakistan because the Soviets were India's allies, and Pakistan knew they would be in trouble if India could pressure them from the west as well as the east.
Precisely because of the threat of Indian allies ruling in Afghanistan, Pakistan was forced to support some group against the Indians' buddies the Northern Alliance.This group happened to be the Afghan Taliban, but they showed no signs of being like the TTP. They would never kill school children, for example, and they would never attack another Muslim army like the Pakistani Army. They had no problems with the Two Nation theory, or the creation of Pakistan, which the TTP openly attacked.
In the wake of the US invasion, India got another chance to influence Afghanistan, and attack Pakistan from the west. As part of this, they came up with the TTP, probably together with the CIA.
TTP is a clever RAW-backed covert operation, a gang of murderers who have confused everyone into thinking they have something to do with the Afghan Taliban, when they actually don't. They dress the same, they speak the same, they appear religious. The TTP, however, is utterly different from the Afghan Taliban, since the TTP works hard to destabilize Pakistan and attack Pakistan's founding ideology (incidentally, two Indian preoccupations right there), and they especially hate the Pakistani Army. The Afghan Taliban does none of this; since the US invasion, they mainly just want the US out of there.
After this recent TTP massacre of children, General Raheel Sharif is flying to Kabul to ensure that the Afghans co-operate with him as he hunts down the TTP leaders on Afghan soil. These operations will also lead to hunting down the TTP's Indian backers in Afghanistan.
None of this stuff would be happening if it weren't for the persistent efforts of India's security establishment to find a way to attack Pakistan from the west. That's the key external source of this problem.