Sorry to say, it will be end of us. A two front war. Why would India not attack from east when our forces are getting into death trap in west ?
Some facts: PAk - Afghan border is 2800 kms filled with villages, rivers, mountains, caves, rough terrain. How we are going to stop Afghans utilizing the terrain and entering with AK47s, RPGs, FPV drones and indian supplied other ammunition to avenge the invasion ?
Also for context, Israeli - lebanon border is only 120 KMs. Yet Hizbullah which don't even controls the country of lebanon still be able to inflict pain to israelis using FPV drones and ATGMs attacks. Taliban on other hand officially controls whole of Afghanistan. They have resources of whole country in their hand and entry places to do suicide attacks, RPGs, ATGMs, FPV or one-way drones into Pakistan are way too many (2800 km border).
Also invading afghanistan means, we are essentially making all afghans (both taliban and anti-taliban) united as a single front against Pakistan.
Afghanistan is not a small country. It has over 30,000 towns and villages. We will get tired after taking 20 and price will be too heavy. There's ZERO incentive to invade Afghanistan. Had Afghanistan be rich with oil and gas then it would make some sense to do such a gamble. You want us to use super expensive missiles, ammo, over a barren land of Afghanistan where they have absolutely no shortage of man-power then what will be left in our stocks to takecare for primary front india ?
Honestly, you and me come to forums as time pass activity, but there are people in national security and military who are paid to think on such possibilities as their main job. If invading AFG had any chances of success or any advantages then we would have done that long ago.
What we should do instead is to send our spies and agents in that country to merge and infiltrate into ranks of taliban. That will be much more beneficial then sending military with extremely limited resources and creating biggest mess of our history,