The President's whole point was the war in Afghanistan nearly bankrupted the Soviet Union. He will not allow the never-ending war in Afghanistan to do the same to the U.S.
The massive size of the Soviet Union, cost of satellite nation central control from Moscow, with little ROI, and unsustainability of the communist model is what bankrupted them. They never had anywhere near the amount of personnel and material committed to Afghanistan, as we did in Vietnam. Additionally, the logistics of getting men and supplies there was much simpler and cheaper.
The president also wondered aloud, during the cabinet meeting, why Pakistan was not fighting in Afghanistan. There’s no delicate nuance to this: The entire reason why the Taliban exists, is because of Pakistani influence within the country. It’s exactly what we do not want. He is simplistic and naïve in his understanding of regional world issues and history.