There isn't a general answer
You need to compare the spell effects where different spells are in opposition to each other. In this case, when the friendly wizard gives the Fighter a suggestion, the Fighter is already dominated by the other wizard. Their decision making has been taken over by that domination.
You can use your action to take total and precise control of the target. Until the end of your next turn, the creature takes only the actions you choose, and doesn’t do anything that you don’t allow it to do. During this time you can also cause the creature to use a reaction, but this requires you to use your own reaction as well. (Basic Rules, Dominate p. 88-89)
The bolded text would be hard to overwrite by a suggestion, since the Fighter would be trying to do something different than the enemy wizard would allow him to do.
You suggest a course of activity... The suggestion must be worded in such a manner as to make the course of action sound reasonable. Asking the creature to stab itself, throw itself onto a spear, immolate itself, or do some other obviously harmful act ends the spell. (Basic Rules, p. 102)
Suggestion does not appear, by the rules text, to overwrite the control being exercised by the wizard who cast dominate.
Can the DM rule otherwise? Sure.
If the DM wants to give this a chance to succeed, the ruling ought to account for the differing levels in power and magical effect between the two spells.
At best this would be a contest (as outlined below) with disadvantage applied to the friendly wizard's roll, or advantage applied to the enemy caster's roll.
The DM can also decide that circumstances influence a roll in one
direction or the other and grant advantage or impose disadvantage as a
result. (Basic Rules, p. 57, Advantage/Disadvantage)
If the two spells were of the same level, or were the same spell ...
This situation would fit the Contest rules.
Sometimes one character’s or monster’s efforts are directly opposed to
another’s. This can occur when both of them are trying to do the same
thing and only one can succeed, ...(Basic Rules, p. 58)
Since the two spell casters are contesting control of the fighter, have them roll an ability check under the contest rules (spellcasting ability vs spellcasting ability) presuming that the fighter failed the saving throw versus the enemy spell caster.
Both participants in a contest make ability checks appropriate to
their efforts. They apply all appropriate bonuses and penalties, but
instead of comparing the total to a DC, they compare the totals of
their two checks. The participant with the higher check total wins the
contest. That character or monster either succeeds at the action or
prevents the other one from succeeding.