Why $ b =1 $ solves the contradiction in this proof? The proof is given below:

Theorem 3.3 (Pythagoras). The number $\sqrt{2}$ is irrational.
Proof. Suppose, to the contrary, that $\sqrt{2}$ is a rational number, say $\sqrt{2}=a/b$, where $a$ and $b$ are both integers with
  $\gcd(a,b)=1$. Squaring, we get $a^2=2b^2$, so that $b\mid a^2$. If
  $b>1$, then the Fundamental Theorem of Arithmetic guarantees the
  existence of a prime $p$ such that $p\mid b$. It follows that $p\mid
> a^2$ and, by Theorem 3.1, that $p\mid a$; hence, $\gcd(a,b)\geq p$. We
  therefore arrive at a contradiction, unless $b=1$. But if this
  happens, then $a^2=1$, which is impossible (we assume that the reader
  is willing to grant that no integer can be multiplied by itself to
  give $2$). Our supposition that $\sqrt{2}$ is a rational number is
  untenable, and so $\sqrt{2}$ must be irrational.

(Image that replaced text).
But I do not understand why $ b =1 $ solves the contradiction in this proof. Could anyone explain this for me please?

If $a^2 = 1$, then $a = 1$ or $a = -1$. In the latter case, $b$ would also need to be negative for their ratio to be positive; so, let us pursue the former case without loss of generality.
If $a=1$, then we would have $1/b = \sqrt{2}$ for some positive integer $b$. But, squaring both sides would then yield that $1/b^2 = 2$, i.e., $b^2 = 1/2$. Since $b$ is a positive integer, we have that $b \geq 1$ hence $b^2 \geq 1$, from which we conclude that it cannot be the case that $b^2 = 1/2$, for $1/2 \not\geq 1$.
