Ah, trickey question.
Usually, to make your Steam account premium you must make a purtchase. Doesn't just say a game.
To make your TF2 account premium, you must buy something with the Mann Co. Store.
To answer your question, you can get both premium (I'm 90%) by simply adding $$ into your Wallet, then making a purtchase from the Mann Co. Store. BUT, just buying a game will only make your Steam, not TF2--- premium.
If you do that, and you're TF2 but not your Steam is premium, then you must make a game purtchase. Which I higly down would happen.