Warning: the words "enhancement" and "enchantment" look similar, but are different. Please read carefully.
Magic you add to a weapon have either a "plus bonus" cost or a flat gold piece cost. Let's focus on the "plus bonus" cost first:
A speed weapon costs a +3 bonus.
A flaming weapon costs a +1 bonus.
A holy weapon costs a +2 bonus.
Each +1 to to-hit and damage enhancement also costs +1 per +1 (makes sense, right?)
So a +4 speed, flaming, holy sword costs +4 (+4 enhancement) +3 (speed) +1 (flaming) +2 (holy) = +10 total enchantment.
The max total you can go is +10. So a +10 speed(+3) scimitar is not allowed since that totals +13.
You can have multiple magic enchantments on a weapon, so the +4 speed holy flaming is allowed.
The cost of these enchantments is bonus-squared times 2000gp. So a +1 weapon = 1 * 1 * 2000 = 2000 gp. A +10 weapon = 10 * 10 * 2000 = 200,000gp.
A magic weapon is required to have at least a +1 enhancement before any special enchantments can be added.
Then there are enchantments that cost a flat gold piece amount. I don't see any listed in the DMG, but you would just add the cost of these enchantments to the cost of the magic weapon.
Good luck!