Okay, let's go there, why not.
Let's assume they're accidentally resurrected by fate / what have you and not intentionally by Lan Xichen who finally lost his last remaining bit of common sense and went crying to Wei Wuxian because he couldn't bear it any more until the poor guy decided to help his brother-in-law before he tried it himself and probably died horribly. (That's going to be the path I take in my post-canon xiyao fic, but in that one, Nie Mingjue stays dead.)
Let's also assume that in resurrecting Nie Mingjue's qi deviation is reset and that both of them somehow retain their golden core. Also "resurrection" for me means they're alive. Breathing with a pulse and all the strengths and weaknesses that come with it. Whether Jin Guangyao's arm was buried with him and reattached itself due to fierce-corpse-magic or not is also only marginally relevant.
Also since you're tagging this as Nieyao, I'll give an optimistic answer.
They come back to life abruptly, still in the coffin - extremely confused, both beaten up from their scuffle. The wards that keep the coffin sealed are meant to keep in two fierce corpses, not two very much alive humans. They fail when a living Nie Mingjue tries to break out. The path is clear.
The mountain under which they are buried is guarded or warded, so it will be only a matter of time before the Jiang sect, whose territory this is on, is alerted. Nie Mingjue gets out of the coffin. Baxia is probably in the Stone Castles. Hensheng is wherever, so neither of them is armed. After being dead, golden core or no, their spiritual power would also be negligible.
Jin Guangyao gets out of the coffin more slowly, keeping a safe distance to Nie Mingjue, even though the man pays him absolutely no mind: He's the general who won the war right now: He looks at his surroundings, checks with all senses where they are, who else is there (let's say no-one because guarding a coffin is usually redundant), if there are wards, which ... yes, yes, there are wards. He's also very intelligent (come on, they didn't make him general because he could hit things so hard), so he understands that this situation is precarious: He might be physically strong, but he can't defend against a bunch of overzealous armed cultivators that think the fierce corpse got out and don't check first if he even IS a fierce corpse.
Jin Guangyao observes this. He wants to say something - but what do you say to someone you killed and who killed you back? Are they quit now? In his opinion, they kind of are. Nie Mingjue might see things differently. The jianghu, he knows, will absolutely see things differently. Nie Mingjue was revered, honored, and mourned. He ... probably not so much.
Nie Mingjue isn't the type to run from a situation. He notes the wards. He will wait for someone to come. He might even tell Jin Guangyao that it would be just like him to run like the coward he is (which honestly, I don't think is entirely fair). Jin Guangyao stays. Out of spite. Also because he's much more beaten up than Nie Mingjue and in no position to run anywhere.
Lan Xichen, obviously. The man would have a ward in place. Not so much because he expects them to spontaneously come to life, but because ... maybe he fears someone would desecrate the coffin. But the moment something happens, he's running out of seclusion, jumping onto Shuoyue, and flying like the hounds of hell are behind him. He arrives about at the same time as Jiang Cheng + entourage. They may be a lot closer, but they don't have a tenth of Lan Xichen's urgency.
Lan Xichen might no longer be sect leader or anything else, but he still has authority. He decides to take both men to Gusu with him - and they comply. Because of course Jin Guangyao would, and Nie Mingjue would want to keep an eye on him.
From there, it's simple. They are to be under guard - which Lan Xichen will happily volunteer to. He has learned a lesson or two, most importantly that looking away doesn't stop problems from existing. He will talk to them. He will make them face what happened. He will try to understand how the hell it got that way. And maybe, just maybe in a spiritual-power-deprived confinement with a Lan Xichen who actually tries to mediate rather than just act like the dog in the meme with the burning building, they find a common ground. They find that Jin Guangyao was never a traitor, that he truly acted for the greater good - at least to the best of his knowledge. They find that Nie Mingjue thought that Jin Guangao was playing both sides during the Sunshot Campaign, and that he never trusted him after that. They find that Jin Guangyao became utterly terrified of him (with reason, I might add), that he was convinced that Nie Mingjue would one day kill him and he just decided he had to kill him first. (I prefer book-canon here, where he only started poisoning him after the escalation.) They find that they see the world very differently - but so does Lan Xichen, who kind of understands where both are coming from. They find that (and this is a headcanon I kind of have and half plan on using in a fic I'm going to start writing properly soon, but I'm fine if you like it and want to use it, too) Jin Guangyao's technique in playing Cleansing was flawed because while Lan Xichen taught him how to do it, he did not teach him how to ward himself against the effects. Because why would he? He was supposed to play music that helps get people better, right? So when he played the wrong song, he poisoned himself as well. Not as devastatingly because he had no such predisposition, but enough to make him go off the deep end faster and more easily and thoroughly than he might otherwise have. And for the first time, Jin Guangyao speaks his mind. And for the first time, Nie Mingjue listens properly.
So eventually, there will be a trial for Jin Guangyao - and unexpectedly, Nie Mingjue speaks up. Says that there must be a reason why they both came back; that killing him clearly would either make it harder to solve the mystery of their return or go against whatever higher power wanted them alive; that he already HAD died for his crimes and killing him again was just not right.
Nie Huaisang? He'll have a hissy fit. But I believe that his focus would be that Nie Mingjue is alive. He'd want him to take over sect leadership again. He'd want to go back to being the little brother who doesn't want anything to do with all that. And if Nie Mingjue wants Jin Guangyao alive, then he won't kill him behind his back.
Nie Mingjue, I believe, also wouldn't be very thrilled with Nie Huaisang's methods. He wouldn't be that harsh to him, but he would let him know.
So what would they do? Figure out how they came back. Whether it's Nieyao in a relationship and Lan Xichen as "only" their sworn brother or as romantic 3zun is largely irrelevant. And the journey to that understanding with all the baggage that comes with it (in case of a total mystery there would be the lingering question if the power that gave them life in a blink could also take it away) might, just might, be a path to healing.
And I am so not proofreading all that.