If you create a Masterwork Tool for say, a Flute, this gives you +2 circumstance bonus to play it. Say it was also enchanted with Skill bonus (competence) +5, will it now be +5 or +7 to play?
These bonuses stack:
In most cases, modifiers to a given check or roll stack (combine for a cumulative effect) if they come from different sources and have different types (or no type at all), but do not stack if they have the same type or come from the same source (such as the same spell cast twice in succession). If the modifiers to a particular roll do not stack, only the best bonus and worst penalty applies. Dodge bonuses and circumstance bonuses however, do stack with one another unless otherwise specified.
Specifically, a circumstance bonus/penalty:
arises from specific conditional factors impacting the success of the task at hand. Circumstance bonuses stack with all other bonuses, including other circumstance bonuses, unless they arise from essentially the same source.
and a competence bonus/penalty:
affects a character's performance of a particular task ... [stuff about what kinds of rolls they can apply to]. Multiple competence bonuses don't stack; only the highest bonus applies.
So, a circumstance bonus and a competence bonus would stack with each other: they'd both modify the roll if they both applied. The bard would get a +7 with their magical, masterwork flute.
Note that bonuses "provided by multiple masterwork items used toward the same skill check do not stack". So, the bard somehow using a masterwork flute and a masterwork lute on the same check would only get the higher circumstance bonus.