Proof explanation: convexity of the numerical range of an operator (Toeplitz-Hausdorff Theorem)
Note first that, for $x$ with $\|x\|=1$, $$ \langle (\alpha I+\beta T)x,x\rangle =\alpha+\beta\langle Tx,x\rangle.$$ Since $\eta=t\lambda+(1-t)\mu$, $$ t=\frac{\eta-\mu}{\lambda-\mu}. $$ So, if $\mu\in W(T)$, then $\mu=\langle Ty,y\rangle$ for some $y$ with $\|y\|=1$, and then $$ t=\frac{\eta-\mu}{\lambda-\mu}=\alpha+\beta\mu=\alpha+\beta\langle Ty,y\rangle=\langle (\alpha I+\beta T)y,y\rangle \in W(\alpha I+\beta T). $$ Conversely, if $t\in W(\alpha I+\beta T)$, then $t=\alpha+\beta\langle Tz,z\rangle$ for some $z$ with $\|z\|=1$, and \begin{align} \eta=t\lambda+(1-t)\mu&=\lambda\alpha+\lambda\beta\langle Tz,z\rangle+\mu-\mu\alpha-\mu\beta\langle Tz,z\rangle\\ \ \ &=(\lambda-\mu)(\alpha+\beta\langle Tz,z\rangle)+\mu\\ \ \\ &=-\mu+\langle Tz,z\rangle+\mu\\ \ \\ &=\langle Tz,z\rangle\in W(T). \end{align}
The fact that $g(\theta_0)$ is real is used in the "straightforward calculation" that shows that $f$ is real.
The trick in the proof is to change the question of whether $\eta\in W(T)$ into $t\in W(S)$. At the end of the proof the function $f$ is used to show that all of $[0,1]\subset W(S)$, so in particular the $t$ from the beginning satisfies $t\in W(S)$, which in turns implies $\eta\in W(T)$.