In a triangle $ABC$ the bisector $BE$ and the median $AD$ are perpendicular to one another. Find the lengths of the triangle, given $BE=AD = 4$.
The picture wasn't given, but here's my interpretation \ attempt:
I figured that in order for $BE$ and $AD$ to be perpendicular, $\angle BAC$ has to be obtuse, but I might be wrong.
After this point I did the following: $$BO^2 =a^2-4$$ $$ (4-BO)^2 = AE^2 - 4$$ $$BO^2 - 8BO + 16 = AE^2 - 4$$ $$ a^2- 4 - 8\sqrt{a^2-4} + 16 = AE^2 - 4$$ $$ AE^2 = a^2 - 8\sqrt{a^2-4} + 16$$
Not sure how to go from here. I believe my approach can lead to an answer, but it is very "messy". How to proceed from here on? And is there a cleaner solution to this problem?

Since we have $AD=4$ and the bisector $BE$ is perpendicular to $AD$, we have $AO=OD=2$. Now let us trace the perpendicular from $C$ to $AD$ and call $H$ the foot of this perpendicular (in your figure, $H$ is on the prolongation of $AD$). Because $BD=DC$, then $OD=DH=2$ and $AH=6$. Thus, the right triangles $CHA$ and $EOA$ are similar with a ratio of $3:1$. Also, by simmetry of the construction we have $BO=CH=k$, so $OE=k/3$. From this, taking into account that $BE=4$, we directly get $BO=3$ and $OE=1$.
Since $BO=3$ and $AO=AD=2$, the two right triangles $BOA$ and $BOD$ are congruent. So we have $$AB=BD=\sqrt{3^2+2^2}=\sqrt{13}$$ $$BC=2BD=2\sqrt{13}$$
Lastly, since $AC$ is the hypothenuse of the right triangle $ACH$, it follows
$$AC=\sqrt{6^2+3^2}=3\sqrt{5}$$