While studying algebra from Thomas Hungerford I have a question in proof of a theorem on page: 186 .
Question is in 3rd last line of the proof.
How does $x\neq x' $ implies $1_{R} \in I$?
I am not able to deduce the reasoning behind it.
Any help would be really appreciated.

The "preceding argument" referred to here is the part of the proof where it was shown that if $\sum_{k=1}^m (r_k + I) \pi(x_k) = 0$ with $r_k \in R$ and $x_1, \dots, x_m$ distinct elements of $X$, then $r_k + I = 0$ for all $1 \leq k \leq m$.
Here, if $x \neq x'$, we have this exact situation, where $m = 2$, $x_1 = x$, $x_2 = x'$, $r_1 = 1_R$, and $r_2 = -1_R$. We conclude that $1_R + I = 0$, i.e. $1_R \in I$.
To put this another way, the preceding argument showed that the (potentially infinite) tuple $(\pi(x))_{x \in X}$ is linearly independent (which is stronger than showing that the set $\{\pi(x) : x \in X\}$ is linearly independent). In particular, the elements of the tuple $(\pi(x))_{x \in X}$ must be distinct, i.e. $\pi|_X$ is injective.