Refinance immediately even if you only plan to stay in the house for 2 years. You can get a no cost refi in exchange for a higher rate, which would still be well below your current rate. If you are underwater or have other circumstances preventing you from a refi, fix those circumstances ASAP, then refi.
Everything SOL said makes a lot of sense, but he missed one important thing in evaluating the scenario. The same "tax effect" he explained related to the mortgage interest should be applied to your income as well, but it might be applied at a slightly lower rate depending on the type of income. If you are earning an 8.725% return on capital gains, it could be taxed at 0% (LT gains in 10% or 15% bracket) or 15% (LT gains in 25% bracket or higher) or ordinary tax rates (ST gains) which would make it roughly equivalent to the rate you are saving in mortgage interest. For the sake of simplicity, let's assume you are paying ordinary tax rates on the hypothetical investment return, and you are in the 25% tax bracket.
So invest $2,000/month ($24K/yr) and earn 8.725% gross, 6.544% net (8.725% x (1-25%)) OR
Pay extra mortgage of $2,000/month ($24K/yr) and save 8.725% gross, 6.544% net (8.725% x (1-25%))
Either way you earn/save 6.544% net of taxes. Now as SOL said your mortgage interest deduction may be limited by the automatic standard deduction effect. You also might not pay such a high tax rate on the investment gains, but this should all be part of your evaluation of what makes the most sense.
It if were me, I would do everything I could to pay this off/down, unless (or until) a refinance is an option.