Proof of the standard pseudorandom generator + XOR encryption scheme in Goldreich
The inequality is obtained by a distance argument.

Consider two points $X,Y$ on the real line. Taking another point $Z$, you have $|X-Z| + |Y-Z| \geq |X-Z+Z-Y| = |X-Y|$.

Applying this "triangle" inequality to your equality 1, we have for any $z \in \mathbb{R}$,
$\begin{array}{l}
 \bigl\lvert\Pr[A(x\oplus g(U_n))=1] - z\bigr\rvert
 + \bigl\lvert \Pr[A(y\oplus g(U_n))=1]- z\bigl\rvert \\
 \geq \bigl\lvert\Pr[A(x\oplus g(U_n))=1] - z + z - \Pr[A(y\oplus g(U_n))=1]\bigr\rvert \\
 = \bigl\lvert\Pr[A(x\oplus g(U_n))=1]-\Pr[A(y\oplus g(U_n))=1]\bigr\rvert \\
 &gt; 1/p(n). \\
\end{array}$

By setting $z = \Pr[A(x \oplus U_m)=1] = \Pr[A(y \oplus U_m) = 1]$, we have
$\begin{array}{l}
 \bigl\lvert\Pr[A(x\oplus g(U_n))=1] - \Pr[A(x \oplus U_m)=1]\bigr\rvert \\
 + \bigl\lvert \Pr[A(y\oplus g(U_n))=1]-\Pr[A(y \oplus U_m) = 1]\bigr\rvert \\
 &gt; 1/p(n). \\
\end{array}$

The one of two absolute values is bigger than $1/(2p(n))$.
Therefore, WLOG, you obtain your equation 3.