When special abilities modify the enhancement bonus, you use the total enhancement bonus to determine cost. This applies to weapons, armor and shields.
Special abilities count as additional bonuses for determining the market value of the item, but do not modify attack or damage bonuses (except where specifically noted). A single weapon cannot have a modified bonus (enhancement bonus plus special ability bonus equivalents) higher than +10.
Your example of a +1 Flaming weapon has a +2 enhancement bonus and thus costs 8000g + base item and masterworking.
Some qualities from outside of the SRD have direct cost modifiers like +300gp. These just add on to the price instead of changing the enhancement bonus.
If I were to crate a masterwork blue ice long sword, would it be the same as +1 blue ice long sword? (Minus it being magical) +1 to touch and +1 to damage?
For the purposes of attack and damage rolls, yes. For most other purposes, no.
The issue is that while attack rolls with the weapon have a +1 enhancement bonus, and damage rolls with the weapon have a +1 enhancement bonus, this is not the same as the weapon itself having a +1 enhancement bonus. Enhancement bonuses to weapons add enhancement bonuses of the same value to attack and damage rolls, but they do more than that. They increase the weapon’s hardness, they allow the use of weapon augment crystals, and so on.
The weapon is also not magical. It’s not subject to dispel magic, but it doesn’t overcome DR as a magic weapon would, either. It has no chance to glow (as 30% of magic weapons do). Anything that talks about magic weapons isn’t talking about a masterwork blue ice weapon.
Does this enhancement stack if the weapon were to be magical, say a +2 blue ice long sword. Giving a +2 to attack and +3 to damage?
No. Both the enhancement bonus to a magic weapon and the blue ice apply an enhancement bonus to damage rolls; enhancement bonuses never stack.
Magic weapons have enhancement bonuses ranging from +1 to +5. They apply these bonuses to both attack and damage rolls when used in combat.
(emphasis mine; the bonus is not just the number, but the type too.)
Enhancement bonus
An enhancement bonus represents an increase in the sturdiness and/or effectiveness of armor or natural armor, or the effectiveness of a weapon, or a general bonus to an ability score. Multiple enhancement bonuses on the same object (in the case of armor and weapons), creature (in the case of natural armor), or ability score do not stack. Only the highest enhancement bonus applies. Since enhancement bonuses to armor or natural armor effectively increase the armor or natural armor's bonus to AC, they don't apply against touch attacks.
Best Answer
It does not
This is explained on Magic Weapons:
You will notice that though both add an enhancement bonus, the masterwork's enhancement bonus is not a magic weapon's enhancement bonus, which is required before you can add a Special Ability to weapons:
Though both are enhancement bonuses, a masterwork weapon is not a magic weapon yet. It becomes a magical weapon once you bestow the first +1 magical enhancement bonus on it, as explained on this answer about calculating the costs of a magical weapon.
The distinction here, and better explained on Ryan's answer, is that the masterwork's enhancement bonus is applied on your attack rolls, while the magic weapon's enhancement bonus is applied on the weapon, which increases your attack rolls aswell. Being bonuses of the same type, they don't stack.