$\neg(\exists p \exists q \forall x (m(p,x) \to m(q,x)))$
= $\neg(\exists p \exists q \forall x (\neg m(p,x) \lor m(q,x)))$
= $\forall p \neg \exists q \forall x (\neg m(p,x) \lor m(q,x))$
= $\forall p \forall q \neg \forall x (\neg m(p,x) \lor m(q,x))$
= $\forall p \forall q \exists x \neg (\neg m(p,x) \lor m(q,x))$
= $\forall p \forall q \exists x (\neg \neg m(p,x) \land \neg m(q,x))$
= $\forall p \forall q \exists x (m(p,x) \land \neg m(q,x))$
The steps are completely correct. You could also use the rule $\neg(a\implies b) = a\wedge\neg b$, but that is a minor thing.