(a)
$\because\ 2\sin^{2}\frac{\pi}{8} = 1 - \cos{\frac{\pi}{4} = 1 - \frac{1}{\sqrt{2}} = \frac{\sqrt{2} - 1}{\sqrt{2}}}$ (irrational root)
So, other root is $\frac{\sqrt{2} + 1}{\sqrt{2}}.$
Sum of roots $= - a = 1 - \frac{1}{\sqrt{2}} + 1 + \frac{1}{\sqrt{2}} = 2 \Rightarrow a = - 2$
Product of roots $= 1 - \frac{1}{2} = \frac{1}{2} = b$
So, $a - b = - 2 - \frac{1}{2} = - \frac{5}{2}$