If a Longtooth shifter changed into a werewolf and then wild shaped into a bear, would it become a werebear or do I need to do it the other way around?
They would not become a werebear either way, but could wild shape and then shift to get the benefits of shifting
Wild shape only allows you to take the form of a beast (or later on, an elemental), and werecreatures in 5e are not beasts, they are humanoids (with the shapechanger tag), so you cannot wild shape into a werecreature. Shifting does not turn you into a werecreature either, it only allows you to assume a "more bestial appearance"1. So neither of the two would allow you to become a werebear with damage immunity.
If what you are after is not becoming an outright werebear, you just want to be a bear with shifting's bestial appearance, you should wild shape first.
If you shifted first, and then wild shaped into a bear: you would keep the temporary hp that you gained, but your bestial aspect from shifiting would be lost, because wild shape states
Your game statistics are replaced by the statistics of the beast, but you retain your alignment, personality, and Intelligence, Wisdom, and Charisma scores. You also retain all of your skill and saving throw proficiencies, in addition to gaining those of the creature.
The Shifting feature's elongated fangs' bonus action is part of your game statistics and is thus replaced, as it is neither a mental ability scores nor a skill or saving throw proficiency, so you would lose it.
Wild shape first
If you first wild shaped into a bear, which is a beast and therefore OK, you could then shift into Longtooth bestial appearance, because shifting is a racial feature and a wild shaped druid retains most of their racial features (p 67 PHB):
You retain the benefit of any features from your class, race, or other source and can use them if the new form is physically capable of doing so.
This would turn you into a bear with the longtooth bestial appearance, which would give the bear the associated benefits, temporary hp and an unarmed strike fang bonus action attack dealing 1d6+Stength modifier damage.
Even the lowly black bear at CR 1/2 already has a bite attack that deals 1d6 + Strength modifier as damage. The brown bear at CR 1 or polar bear at CR 2 have a bite that deals 1d8 + Strength modifier. However, the bonus action attack happens in addition to the Attack action bite attack, so you would deal extra damage with it, in addition to the normal bite.
1 For reference, here is the relevant rules text on the shifting feature:
Shifting. As a bonus action, you can assume a more bestial appearance. This transformation lasts for 1 minute, until you die, or until you revert to your normal appearance as a bonus action. When you shift, you gain temporary hit points equal to your level + your Constitution modifier (minimum of 1 temporary hit point). You also gain benefits that depend on your shifter subrace, described below.
And the specific shifting subrace feature of the Longtooth:
Shifting Feature. While shifted, you can use your elongated fangs to make an unarmed strike as a bonus action. If you hit with your fangs, you can deal piercing damage equal to 1d6 + your Strength modifier, instead of the bludgeoning damage normal for an unarmed strike.
I'm with Groody the Hobgoblin on Shifting first, Wild Shape explicitly overrides anything else you've got going on, physically.
In regards to Shifting in Wild Shape, however, I note that Long Tooth doesn't give you a Bite attack, instead it says:
[Y]ou can use your elongated fangs to make an unarmed strike as a bonus action[.]
To a RaW reading (i.e., check with your DM) this means that on top of any Bite attack granted by Wild Shape, you also have one (potential) extra attack every round. Perhaps not as strong as the Bite of a Brown or Polar Bear, but since you can use both (with DM approval) it's still a nice extra.
There's a related question where every answer agrees with me, so the RaW reading seems pretty universal. Still, the decision is up to your DM, not RaW or SE consensus.
In regards to the actual question, by "werebear" I'm assuming what was meant was a humanoid, half-bear form. The "werewolf" shape of the Shifter is based on its base Humanoid form gaining "a more bestial appearance" - if a being Wild Shape'd to a bear was to Shift, the result would be "a more bestial" Animal.
Beyond statistical bonuses for Shifting, I'd interpret the visual impact as a slight "hulking out" of the bear form, with thicker muscles, larger jaws, longer teeth and shaggier fur. However, the exact result is up to imagination of the DM.