[EDIT: my previous answer was incomplete. This was updated to derive rigorously the full set of solutions]
1) Assume $f(x)\not=0$. Then $f^2$ differentiable at $x$ implies $(f^2(x+h)-f^2(x))/h$ has a finite limit as $h\to 0$, equivalently ${f(x+h)-f(x)\over h} (f(x+h)+f(x))\to c$. Since $f(x)\not = 0$, $f(x+h)+f(x)\to 2f(x)=k\not =0$ hence $f$ is differentiable at $x$.
2) Now, as in the text, this implies $f(x) = {1\over 2} x +b$ in every interval where $f(x)\not=0$. In other words, the graph of $f$ is a straight line segment parallel to $y=1/2 x$ in every such interval.
There are 3 types of intervals to be considered: maximal intervals $S_-=(u,v)$ in which $f(x)<0$ (hence $f(v)=0$ if $v<+\infty$), maximal intervals $S_0=[u,v]$ in which $f(x)=0$, and maximal intervals $S_+=(u,v)$ in which $f(x)>0$ (hence $f(u)=0$ if $u>-\infty$). Such maximal intervals exist because $f$ is continuous. It has just been shown that that in every interval of the first and third form, the graph of $f$ is a straight segment parallel to $x/2$. Since $f$ is continuous, the end points of two contiguous such segments must be the same (this is what the text expresses as "the two possible solutions at these points must be the same"). By maximality of the intervals, there may exists at most one interval $S_-$, $S_0$ and $S_+$ of each type: $$S_- = (-\infty, \alpha),\quad S_0 = [\alpha, \beta],\quad {\rm and}\quad S_+= (\beta, +\infty).$$
Observe that setting $x=0$ in the proposed equation leads to $0=f(0)^2+C$, hence $C$ must be $\leq 0$ (otherwise there is no solution), and $f(0) = \pm \sqrt{-C}$.
Now, if $C< 0$, $f(0)=\pm\sqrt{-C}$, hence $x=0$ is inside $S_+$ or $S_-$ according to the sign of $f(0)$, and there holds $a.0+b=f(0)=\pm\sqrt{-C}$, hence $b=\pm \sqrt{C}$.
In both cases, the line $x/2+b$ intersects the axis $y=0$ at $x=-2b$.
In conclusion, if $b=\sqrt{-C}\ (>0)$, the general solution must be of this form, for some $\alpha\leq -2b$:
$$
f(x)=\cases{
x/2 - \alpha/2 , & $x\in (-\infty, -\alpha) $,\cr
0, & $x\in [\alpha,-2b]$, \cr
x/2 + b, & $x\in (-2b, +\infty)$.\cr
}
$$
If $b = -\sqrt{C}\ (<0)$, the general solution must be of this form, for some $\beta \geq -2b$:
$$
f(x)=\cases{
x/2 + b, & $x\in (-\infty, -2b) $,\cr
0, & $x\in [-2b, \beta]$, \cr
x/2 - \beta/2 , & $x\in (\beta, +\infty)$.\cr
}
$$
(notice that in these solutions, $\alpha$ and $\beta$ may be equal to $-\infty$ or $+\infty$ resp.).
Conversely, it is easily seen that the above functions are solution of the proposed equation. So, we have found the general form of the solution of this equation whenever $C<0$.
If $C=0$, $x=0$ is in $S_0$ hence the general solution must be of the following form, with $\alpha\leq 0$ and $\beta\geq 0$:
$$
f(x)=\cases{
x/2 - \alpha/2 , & $x\in (-\infty, \alpha) $,\cr
0, & $x\in [\alpha,\beta]$, \cr
x/2 - \beta/2, & $x\in (\beta, +\infty)$.\cr
}
$$
(again, $\alpha$ may be equal to $-\infty$ and $\beta$ to $+\infty$).
Conversely, such a function is easily seen to be a solution of the equation for every $\alpha\leq 0$ and $\beta\geq 0$.