$\alpha = 180^\circ - 45^\circ$
$\alpha = 135^\circ$
$\beta = 180^\circ - \alpha - \theta$
$\beta = 180^\circ - 135^\circ - \theta$
$\beta = 45^\circ - \theta$
From ΔDEC
$\tan 45^\circ = \dfrac{h}{y}$
$y = \dfrac{h}{\tan 45^\circ}$
$y = h$
From ΔAEC
$\tan \theta = \dfrac{h}{x}$
$x = \dfrac{h}{\tan \theta}$
From ΔBEC
$\tan \beta = \dfrac{h}{y + z}$
$z = \dfrac{h}{\tan \beta} - y$
$z = \dfrac{h}{\tan (45^\circ - \theta)} - h$
$z = \dfrac{h}{\dfrac{\tan 45^\circ - \tan \theta}{1 + \tan 45^\circ \, \tan \theta}} - h$
$z = \dfrac{h}{\dfrac{1 - \tan \theta}{1 + \tan \theta}} - h$
$z = \dfrac{h(1 + \tan \theta)}{1 - \tan \theta} - h$
Since CD is median of ΔABC, point D is at the midpoint of AB, thus,
$x + y = z$
$\dfrac{h}{\tan \theta} + h = \dfrac{h(1 + \tan \theta)}{1 - \tan \theta} - h$
$\dfrac{1}{\tan \theta} + 1 = \dfrac{1 + \tan \theta}{1 - \tan \theta} - 1$
$\dfrac{1}{\tan \theta} - \dfrac{1 + \tan \theta}{1 - \tan \theta} + 2 = 0$
$(1 - \tan \theta) - \tan \theta(1 + \tan \theta) + 2\tan \theta(1 - \tan \theta) = 0$
$1 - \tan \theta - \tan \theta - \tan^2 \theta + 2\tan \theta - 2\tan^2 \theta = 0$
$1 - 3\tan^2 \theta = 0$
$\tan^2 \theta = \frac{1}{3}$
$\tan \theta = \frac{1}{\sqrt{3}}$
$\theta = 30^\circ$ answer