Is the Following Proof Correct?
Let $x,y$ be real numbers and let $ε>0$ be a positive real. Show that $|x-y|<ε$ if and only if $y-ε<x<y+ε$.
Proof. Assume that $|x-y|<ε$, proposition 5.4.7 implies that either $x=y$, $x>y$ or $x<y$. In the first case the claim in question simplifies to $x-ε<x<x+ε$ which is evident when we consider that $ε>0$.
In the event $x>y$ it follows that $|x-y| = x-y<ε$ or equivalently $x<y+ε$. In addition since $y<x$ and $ε>0$ it follows that $y-ε<x$ in conclusion $y-ε<x<y+ε$. Likewise in the event where $x<y$ it follows that $|x-y| = y-x<ε$, adding $x-ε$ to both sides gives $y-ε<x$. In addition since $x<y$ and $ε>0$ it follows that $x<y+ε$ thus $y-ε < x < y+ε$.
Conversely assume that $y-ε<x<y+ε$ or equivalently $-ε<x-y<ε$. Again by trichotomy $x-y=0$ or $x-y<0$ or $x-y>0$. Addressing each case in order we see that if $x-y=0$ then $|x-y| = |0|=0<ε$. Now if $x-y<0$ then $|x-y| = -(x-y)=y-x$ but $-ε<x-y$ or equivalently $y-x<ε$, thus $|x-y|<ε$. Finally if $x-y>0$ then $|x-y| = x-y<ε$.
$\blacksquare$
I think our OP Atif Farook's proof is OK, but following all the cases is a somewhat complex task. If we define $\vert z \vert$ as
$z \ge 0 \Longrightarrow \vert z \vert = z, \tag 1$
$z < 0 \Longrightarrow \vert z \vert = -z, \tag 2$
which it seems he does, then we can proceed in shorter order with aid of the
Lemma: $\vert z \vert < \epsilon \Longleftrightarrow -\epsilon < z < \epsilon$.
Proof of Lemma:
$\Longrightarrow:$ Given $\vert z \vert < \epsilon$, for $z \ge 0$, $-\epsilon < z = \vert z \vert < \epsilon$; for $z < 0$, $-\epsilon < -z = \vert z \vert < \epsilon \Longrightarrow -\epsilon < z < \epsilon$; so in both cases, $-\epsilon < z < \epsilon$;
$\Longleftarrow:$ Given $-\epsilon < z < \epsilon$, we have $-\epsilon < -z < \epsilon$; so $z \ge 0 \Longrightarrow \vert z \vert = z < \epsilon$; $z < 0 \Longrightarrow \vert z \vert = -z < \epsilon$.
End: Proof of Lemma.
Now taking $z = x - y$ we see that
$\vert x - y \vert < \epsilon \Longleftrightarrow -\epsilon < x - y < \epsilon \Longleftrightarrow y - \epsilon < x < y + \epsilon. \tag 3$
As my colleague Mohammad Riazi-Kermani affirmed, the proof is shortened using properties of $\vert \cdot \vert$, one of which we developed here in the Lemma.