From the left of the box containing the formulae:
Not all items adhere to these formulas. First and foremost, these few formulas aren't enough to truly gauge the exact differences between items. The price of a magic item may be modified based on its actual worth. The formulas only provide a starting point. The pricing of scrolls assumes that, whenever possible, a wizard or cleric created it. Potions and wands follow the formulas exactly. Staves follow the formulas closely, and other items require at least some judgment calls.
So... basically, things don't necessarily follow the formulae. I suspect that this is a just a case of limited utility; for example, an item capable of performing same-duration, same-level Protection From Energy with use activation is significantly more useful for the same nominal price by the formulae as a Lantern of Revealing in the vast majority of cases (energy-using foes being generally more common than invisible foes. ProtEnergy would also let you avoid friendly fire incidents, and doesn't have the downside of revealing your own invisible rogue like the lantern does).
Pricing
OK, so there are basically three costs being added together here:
- Base cost of the Elven Thinblade: 100 gp
- Masterwork cost (prerequisite for any magic weapon): 300 gp
- +2-equivalent cost (+1 keen, as keen is a +1-equivalent): 22×2,000=8,000 gp
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.
Wealth Sidenote
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.
Best Answer
You are mixing up Caster Level and Spell Level. The formula for pricing magic items is generally
where X varies depending on the type of item. The Spell Level is as listed in the spell’s description, and seems to be the number you are using for both Spell Level and Caster Level. However, Caster Level is different: it is a property you get for having levels in the class that grants the spell.
Caster Level in most classes is equal to your level in the class. Some (so-called “half-casters,” e.g. paladin and ranger) have Caster Level equal to only half their class level. There are even oddball cases that use a different scheme for determining Caster Level.
Furthermore, each class gains access to spells of a particular Spell Level only at a certain Caster Level, which is usually higher than the Spell Level itself. For example, clerics, druids, and wizards only get to cast 2nd-level spells at Caster Level 3, while bards, paladins, rangers, and sorcerers get them at Caster Level 4. This is the minimum Caster Level for those spells for those classes.
Items are usually crafted at minimum Caster Level to keep the cost down, but the Caster Level must be at least the Caster Level at which the Spell Level may first be cast. For a 2nd-level Druid spell like barkskin, that is Caster Level 3.
With all of this information, it becomes clear what’s going on. You should be multiplying Spell Level and Caster Level, i.e. 2×3, but you are multiplying Spell Level with itself, i.e. 2×2. If you use 2×3×(50 gp), you get the 300 gp you see in the other table.
For a 3rd-level Cleric spell like water walk, a cleric needs a minimum of Caster Level 5 to cast that, so the cost is 3×5×(50 gp), or exactly the 750 gp you see in the table.
While not usually done, you can craft things with higher Caster Level. For example, you could craft a water walk potion with Caster Level 10 (assuming you have a Caster Level of 10 or greater), so that it lasts longer and is harder to dispel. This would cost 3×10×(50 gp) = 1,500 gp. This gets prohibitively expensive quickly, so most people stick to minimum Caster Level most of the time.
Do note that when you create a magic item yourself, you only pay gold equal to half the item’s base value. Be careful about whether a given table is giving you the crafting cost or the base cost. Also, some spells require extra materials or XP to cast, which is also reflected in their cost to create, and therefore also in their base cost.
Anyway, as for DMing and charging players who want to buy items, base costs are usually equal to the market value of the item. Most of the time, I strongly recommend just leaving it at that; the pricing isn’t anything like perfect but it works well enough and changes can have very unexpected results. Costs can be tweaked to represent unusual economic situations (particularly high demand for a given item, perhaps), but generally speaking that sort of thing should be done very carefully, and I recommend new DMs avoid doing so until they have a pretty good grasp of how the economy and system works (or doesn’t).