\triangle ABD\sim\triangle DBC\Longrightarrow AB:BD=BD:BC\Longrightarrow BD=\sqrt{AB\cdot BC}=\sqrt{a}