So, a friend of mine is trying his hand at GMing and is planning out a campaign that will start us out at level 5 with a 5000gp starting budget. My Elven Swashbuckler will be bringing along a +1 Keen Elven Thinblade, but I'm having trouble calculating the cost due to confusion from the wording of the book; can a weapon have a +1 bonus from being Masterwork quality in addition to a magical effect, or would that +1 bonus be priced as a magical effect, too?
OK, so there are basically three costs being added together here:
Total is 8,400 gp: outside of your budget.
A +1 thinblade would be 12×2,000+300+100 = 2,400 gp. A masterwork thinblade would be 400 gp.
The bonus from masterwork is a +1 Enhancement bonus to attack. A +1 bonus gives a +1 Enhancement bonus to both attack and damage. As bonuses of the same type, the Enhancement bonus to attack from being masterwork and the Enhancement bonus to attack from being a +1 weapon do not stack: you take whichever is highest. Since they’re both +1, you can take either.
If you were to make a +2 Thinblade, the +2 Enhancement bonus from being a +2 weapon would overwrite the +1 Enhancement bonus for being masterwork. More information can be found here.
Note that a magic weapon must be a masterwork weapon first, and that the first enhancement on the weapon is a simple +1 enhancement. That is, you cannot make a masterwork keen thinblade; it must be +1 before keen can be applied.
As a side note, 5,000 gp is only barely half what the book recommends (a 5th-level character typically has 9,000 gp, by the Wealth By Level guidelines, Table 5-1, on page 135 of the Dungeon Master’s Guide). I do not know all the details of your game, your fellow players, or the DM, but as an experienced 3.5 player with a great deal of system mastery: that worries me greatly. You are at a rather huge disadvantage compared to where the system expects you to be, and the system does not handle that well. If the DM intends to keep me at 55% of the wealth guidelines, I would want to see a very detailed and thorough analysis of all of the other things he is changing in the system to account for that. You cannot simply reduce the players’ wealth across the board, and expect the system to work as designed. It doesn’t.
The fact that the DM is further “trying his hand at DMing” indicates to me that he most likely does not have nearly the experience necessary to make such sweeping changes to the system. Don’t get me wrong: it can be done. The Wealth By Level table is explicitly a guideline, after all. But it is not easy. For a new DM, I’d want to introduce as few changes as possible, because every change is something the DM has to become responsible for.