In triangle $A B C$, let $J$ be the centre of the excircle tangent to side $B C$ at $A_{1}$ and to the extensions of sides $A C$ and $A B$ at $B_{1}$ and $C_{1}$, respectively. Suppose that the lines $A_{1} B_{1}$ and $A B$ are perpendicular and intersect at $D$. Let $E$ be the foot of the perpendicular from $C_{1}$ to line $D J$. Determine the angles $\angle B E A_{1}$ and $\angle A E B_{1}$.  (Greece)
Let $K$ be the intersection point of lines $J C$ and $A_{1} B_{1}$. Obviously $J C \perp A_{1} B_{1}$ and since $A_{1} B_{1} \perp A B$, the lines $J K$ and $C_{1} D$ are parallel and equal. From the right triangle $B_{1} C J$ we obtain $J C_{1}^{2}=J B_{1}^{2}=J C \cdot J K=J C \cdot C_{1} D$ from which we infer that $D C_{1} / C_{1} J=C_{1} J / J C$ and the right triangles $D C_{1} J$ and $C_{1} J C$ are similar. Hence $\angle C_{1} D J=\angle J C_{1} C$, which implies that the lines $D J$ and $C_{1} C$ are perpendicular, i.e. the points $C_{1}, E, C$ are collinear.  ![](https://cdn.mathpix.com/cropped/2024_04_17_e55ccc62f43b046023cag-41.jpg?height=625&width=874&top_left_y=924&top_left_x=594)  Since $\angle C A_{1} J=\angle C B_{1} J=\angle C E J=90^{\circ}$, points $A_{1}, B_{1}$ and $E$ lie on the circle of diameter $C J$. Then $\angle D B A_{1}=\angle A_{1} C J=\angle D E A_{1}$, which implies that quadrilateral $B E A_{1} D$ is cyclic; therefore $\angle A_{1} E B=90^{\circ}$.  Quadrilateral $A D E B_{1}$ is also cyclic because $\angle E B_{1} A=\angle E J C=\angle E D C_{1}$, therefore we obtain $\angle A E B_{1}=\angle A D B=90^{\circ}$.  ![](https://cdn.mathpix.com/cropped/2024_04_17_e55ccc62f43b046023cag-41.jpg?height=691&width=943&top_left_y=1962&top_left_x=565)