What if the boss or the profiteur connect to the gold?
It's clear that the rules are a little badly worded.  They say:


  The Boss builds tunnels for both the Green and the Blue Team and wins
  every time one of the teams wins.


However, the game's creator has made it clear that in the corner case, where the path is completed but both the Blue and Green teams are blocked by a door, the Boss wins anyway (even though it is not true that "one of the teams wins").

I think that the Profiteer wins in this situation too - the Profiteer ALWAYS wins, after all...

See this old question - in fact now I read that, I'm a bit worried that this question may count as a duplicate...

ETA: I think if one dwarf wins, they get 5 Gold.  If one dwarf wins and he's the Boss, he gets 4 Gold.  If two dwarves win, and they're the Boss and the Profiteer, they would get 4 gold each, minus their respective "job penalties": so 3 Gold for the boss and 2 Gold for the profiteer.  Seems like a reasonable interpretation of the creator's assertion that the Boss winning on his own gets 4 Gold (assuming he didn't just pluck that figure out of thin air...)

In short, I'd say that the "1 or 2 less than the other winners get" (for the boss and profiteer) is another sloppily worded piece of rules.  "1 or 2 less than they would otherwise get" would be a better way of putting it.  If the Profiteer won on his own, for example, he'd get 3 Gold (5-2).