Need more details.
Can you contribute a big chuck of your bonus into your 401K? Do you have an employer match? Can you contribute to an IRA?
Is your student loan interest tax deductible? It's phased out when you make a high wage, but it depends on the other details of your tax situation.
Obviously if you pay off the debts do the 5% first. Investing should provide a bigger return than those interest rates, but many people think the market is over valued right now so maybe not in the short-term.
My wife and I are still carrying $20K SL debt at 4% 14 years after graduation, so I bet you can guess what I do with my extra $. Max the 401K's, IRA's, any other tax deferred vehicles, then invest in post tax accounts.
If the interest rates are fixed they are a nice hedge against inflation.