Apply common sense for the enemies.
Have I seen where my enemies used to be before the darkness? If so, charge in that direction and attack. Or, if I think they are too strong for me or preparing a trap, run in the opposite direction.
If I don't know where my enemies are and want to get away from the darkness, probably I would just move in the same direction I was originally going. If I was standing guard, just step forwards from the place I was guarding.
If I am too scared to step out of the darkness, perhaps just take a few careful steps in a random direction to see if I can find some defensible spot, like back to a wall, then hope for the best in case something tries to attack me while I can't see.
Edit: If I have no reason to believe I can actually exit the darkness and its just me going blind, but there is suspicion that I will be attacked, declare a ready action to strike back at whatever attacks me if able.
In any case, try to RP the NPCs acting in a believable manner according to their personality. They might not know the shortest path out of the darkness. Some NPCs could be clever, and other could make bad calls.
If a GM wants to leave this to randomness, then I would suggest an INT or WIS check depending on what the enemy is trying to figure out, but in general it is not required for the GM to roll for this. In case you do want to roll:
- A Wisdom ability check could be used to use another sense or features in the environment to find the way out of the darkness. Think sounds or wind direction.
- An Intelligence ability check could be used to recall the layout of the place from memory and move around, or to find the most logical route using known information.
It depends on where they are standing
The darkness spell is described in such a way as to give the impression that it is something tangible that spills out around corners, but can be blocked by objects. Think of darkness as not unlike a fog cloud spell.
The darkness spreads around corners. [...] Completely covering the source of the darkness with an opaque object, such as a bowl or a helm, blocks the darkness.
Likewise, darkness engulfs non-magical light - or rather, it cannot be illuminated by non-magical light. This means that magical light can illuminate it.
Light in 5e is described as having bounds. Faerie fire indicates that afflicted creatures shed dim light, which only means that area imposes disadvantage on Wisdom (Perception) checks; attacking into dim light behaves as normal.
This is where location comes into play. The bounds of the dim light must penetrate the bounds of the darkness spell in order to be seen. Put another way, there must be no darkness between you and the creature. You need to check the positions and radius of the area of darkness and creatures affected by the faerie fire.
If the radius of the darkness spell's area completely engulfs the radius of the dim light, they cannot be seen by you from any angle. If they are 5 feet or more away from the center of the darkness, they can be seen from the direction the dim light is from the center. This is sort of mathy, but really no more difficult than normal line of sight. Darkness spills out around corners continuously, so just visualize or draw the circles and draw a line to the center of the dim light.

Who do I have advantage against?
Advantage and disadvantage hinge on who can see whom. In general, you have disadvantage on attacks against targets you cannot see, and advantage on attacks against targets who can't see you. However, when neither target can see each other (such as when a target is standing in darkness and you are not), you have neither disadvantage or disadvantage.
From the basic rules on advantage:
If circumstances cause a roll to have both advantage and disadvantage, you are considered to have neither of them, and you roll one d20. This is true even if multiple circumstances impose disadvantage and only one grants advantage or vice versa.
This means that faerie fire's advantage only has an effect when no disadvantage is imposed. It is important to note that, as explained in the question, faerie fire must be cast at a level greater than 2nd, or darkness will dispel it.
You have advantage against:
- Targets you can see that can't see you. It shouldn't matter the
circumstances in which this takes place (Devil's Sight, location,
etc); if you can determine who can see whom, this will suffice for
advantage.
- Targets affected by faerie fire that you can see
- Targets in any situation in which you have at least 1 source of
advantage and no sources of disadvantage
You have disadvantage against:
- Targets not affected by faerie fire that you can't see and that can
see you
- Targets in any situation in which you have at least 1 source of
disadvantage and no sources of advantage
You have neither advantage nor disadvantage against:
- Targets you can't see that also can't see you
- Targets affected by faerie fire that you can't see
- Targets standing in dim light that you have line of sight to (i.e.
you can both see each other)
- Targets in any situation in which you have any number of sources of
advantage and disadvantage (at least one of each)
This answer hinges on the fact that the darkness spell is dark in 3 dimensions, much like a 15-foot radius of fog or smoke. I believe this is true because of how the darkness spills around corners and can be blocked by objects.
If the darkness spell only "darkens" objects and ground in its radius, then it makes sense to imply that the faerie fire penetrates through it, making line of sight meaningless. Is it a floating black orb, or is it a radius of darkened objects? Again, I say the former, but I would personally leave this up to the DM.
Best Answer
Targeting works as normal, except with disadvantage
Trying to attack a target does not require sight of the target. However, not being able to see the target means one's attack rolls are at a disadvantage, because the area is considered to be heavily obscured and thus the attacker is effectively blinded when attacking their target. However, if the target also can't see the attacker (both are effectively blinded to each other), the attacker would receive advantage and the attack is rolled with neither because they cancel out.
...or it might be an automatic miss
If the attacker has no information on the target's location - for example, sound of their footsteps, they might have to guess the target's location instead when making their attack (PHB 194-195). If they guess wrong, the attack can miss regardless of what the player rolls. What counts as the correct location is up to the GM unless playing on a grid. The GM is also not forced to reveal whether an attack at a guessed location misses because of a bad roll or a bad guess.
In situations where detecting the target's location might be challenging but possible, it is reasonable to allow a player to roll a Perception check to identify their position.
Some spells require sight
Many spells explicitly state the requirement to see the target. Simply knowing the target's location isn't enough, and no rolls can help one there unless they can somehow make the warlock visible in the darkness.