I have this formula and I need to resolve it with unification:

{ ¬ P1(h(x)), P2(g(y))} , {P1(z), P2(z), P1(h(y)), P3(g(y)) }

I have used this as a unificator:

and I got {

However if I use the unificator:

I get { P2(g(v))} , {P1(g(v)), P3(g(v)) }

so are both ways right or only one is right? In which case, which one is it then?