Official solution
\[\tan \theta = {1 \over 2}\]
\[\tan (\theta + \alpha ) = {x \over b},\tan \alpha = {x \over {a + b}}\]
\[ \Rightarrow {{{1 \over 2} + {x \over {a + b}}} \over {1 - {1 \over 2} \times {x \over {a + b}}}} = {x \over b}\]
\[ \Rightarrow {x^2} - 2ax + ab + {b^2} = 0\]