Obama had three options.
1) Get the U.S. out of Afghanistan.
2) Take all the 100,000+ troops that are being withdrawn from Iraq and transfer them to Afghanistan to really go after the Taliban.
3) A modest surge of troops to Afganistan to compromise.
IMO, option #1 is the best long-term policy for the U.S. For 8 years, the U.S. has not been able to defeat the Taliban, and it doesn't look like anything is going to change in the next few years. Americans don't want an open-ended conflict to drag on and on with little to show for it.
The second best option would be option #2: to go "all-in" and send the troops from Iraq to Afghanistan. This is closest to the policy articulated in Obama's election campaign: Iraq was the wrong war and it compromised America's ability to go after the Taliban. It would also send a message to the Taliban that the U.S. is in it for the long haul.
Unfortunately, Obama chose the not-even-half-ass option #3 of sending only 30,000 troops. This won't do enough to fight the Taliban, and it still reinforces the message to the Taliban that the U.S. isn't going to stick around because it is only going to put enough troops that it can quickly evacuate. American political opinion favours that the U.S. withdraw sooner rather than later and the Taliban know this. The Taliban only have to hide and bide their time until the U.S. is gone.