These questions can be best understood by an example.
Let 'x' represents 'a man' and 'y' represents 'a woman' and let P(x,y) be the function 'married to'. And since 'z' is not playing any role in the function, let us not name it and not bother much about where we place it.
In option (A) it says, ∀x ∀z ∃y [ P(x,y) ]---> ∃y ∀x ∀z [ P(x,y) ], which can be referred to as every x(man) for every 'z' is married to at least one y(woman), which implies that at least one y(woman) is married to every x(men) for every 'z'. Which is definitely different from the first statement.
Hence, option (A) is eliminated.
Moving on to option (B) which is just the converse of (A), ∃y ∀x ∀z [ P(x,y) ]---> ∀x ∀z ∃y [ P(x,y) ], it says that, at least one y(woman) is married to every x(men) for every 'z', this implies that, every x(men) for every 'z' is married to at least one y(woman). Both statements are different.
Hence, with (B) option (C) is also eliminated.
And (D) is the answer.