The integers $m_1$ and $m_2$ serve to bound $nx$ between two integers. The set $$=\{-m_2+1,-m_2+2,\ldots,m_1\}$$ is a finite set of integers, so we can choose the smallest member $m$ of this set such that $nx<m$.
If we knew that $nx$ was positive, we wouldn’t need $m_2$: we could just choose the smallest positive integer $m$ such that $nx<m$, since every non-empty set of positive integers has a least element. In fact, we can use that well-ordering principle directly, once we have $m_1$ and $m_2$. Let
$$M=\{m\in\Bbb Z^+:m-m_2>nx\}\;.$$
Then $M\ne\varnothing$, since $m_1+m_2\in M$, so $M$ has a least element, say $k$. Let $m=k-m_2$. Then $m>nx$. However, $k-1\notin M$, so $m-1=k-1-m_2\not>nx$, i.e., $m-1\le nx$. But note that I needed both $m_1$ and $m_2$ to carry out this argument: $m_1$ is needed to ensure that there is at least one integer that’s big enough to exceed $nx$, and $m_2$ is needed to ensure that not every integer is big enough.
Your confusion seems to arise because the Archimedes principle is stated in terms of $x,y$, and you have different $x,y$ in (b). Restate the Archimedean principle as:
(a) If $u,v$ are real numbers, with $u>0$ then there is a positive integer $k$ such that: $ku>v$.
(All I've done is change the variables, I hope.)
Now, $1$ is a real number, $y-x$ is a real number, and you've proven that $y-x>0$. So we know from (a) that if $u:=y-x$ and $v:=1$ that there is a positive integer, which we will call $n$, such that $(y-x)n>1$.
Similarly, since we know that $nx$ is a real number, and we know that $1$ is a real number and $1>0$, that from (a), setting $u:=1$ and $v:=nx$, that there is a positive integer we'll call $m_1$ such that $m_1\cdot 1 > nx$.
Finally, set $u:=1>0$ and $v:=-nx$ to show that there must be an $m_2$ so that $m_2\cdot 1>-nx$.
The last step is subtler, and doesn't use (a). Since $m_2>-nx$, $-m_2<nx$. So we know that $-m_2<m_1$.
Now, you need a property of the integers: If a non-empty set of integers has a lower bound, then it has a least element.
Take the set $S=\{m\in\mathbb Z: m> nx\}$. We know that $m_1\in S$, so $S$ is non-empty, and we know that $-m_2$ is a lower bound for $S$. So there is a least element $m\in S$. Then $m-1\notin S$, and therefore $m> nx$ and $m-1\leq nx$. So $m-1\leq nx< m$.
Best Answer
It simply uses that any subset of $\mathbf Z$ which is bounded from below (and in particular, any finite subset) is well-ordered, like $\mathbf N$, i.e. has a least element.
SSo here, thet of $m\in\mathbf Z$ such that $nx< m$ is bounded from below by the integer $m_2$, so there is a least such $m$, which by definition means that $m-1\le nx$.