Answer
$ a.\quad$ shown below
$b.\quad\approx 6.71\ ft.$
Work Step by Step
$ a.\quad$
The angle $\theta_{1}$, under which you see the whole height,
from the floor to the upper edge of the blackboard, is such that
$\displaystyle \cot\theta_{1}=\frac{x}{15}$
The angle $\theta_{2}$, under which you see the height
from the floor to the lower edge of the blackboard, is such that
$\displaystyle \cot\theta_{2}=\frac{x}{3}$
The angle $\alpha$ is such that
$\alpha=\theta_{1}-\theta_{2}$
$\displaystyle \alpha=\cot^{-1}\frac{x}{15}-\cot^{-1}\frac{x}{3}$
$ b.\quad$
$\displaystyle \alpha(x)=\cot^{-1}(\frac{x}{15})-\cot^{-1}(\frac{x}{3})$
$\displaystyle \frac{d\alpha}{dx}=-\frac{1}{1+(\frac{x}{15})^{2}}\cdot\frac{1}{15}-[-\frac{1}{1+(\frac{x}{3})^{2}}\cdot\frac{1}{3}$
$=-\displaystyle \frac{1}{15(1+\frac{x^{2}}{225})}+\frac{1}{3(1+\frac{x^{2}}{9})}$
$=-\displaystyle \frac{15}{225+x^{2}}+\frac{3}{9+x^{2}}$
$=\displaystyle \frac{-15(9+x^{2})+3(225+x^{2})}{(x^{2}+15)(x^{2}+3)}$
$=\displaystyle \frac{-135-12x^{2}+675+3x^{2}}{(x^{2}+225)(x^{2}+9)}$
$=\displaystyle \frac{-12x^{2}+540}{(x^{2}+225)(x^{2}+9)}$
$\displaystyle \frac{d\alpha}{dx}=0\quad$ when
$12x^{2}-540=0$
$12x^{2}=540$
$x^{2}=45$
Discarding the negative solution,
$x=3\sqrt{5}\approx 6.71\ ft.$