5. In triangle $A B C$, angle $B$ is right. On side $B C$, the midpoint $M$ is marked, and on the hypotenuse, a point $K$ is found such that $A B=A K$ and $\angle B K M=45^{\circ}$. Additionally, on sides $A B$ and $A C$, points $N$ and $L$ are found respectively, such that $B C=C L$ and $\angle B L N=45^{\circ}$. In what ratio does point $N$ divide side $A B$?
Solution. Let $\angle B A C=\alpha$. Then, since $\triangle A B K$ is isosceles with base $B K$, $\angle A B K=\angle A K B=90^{\circ}-\frac{\alpha}{2}$. Due to the right-angled nature of $\triangle A B C$, the angle $\angle A C B$ is $90^{\circ}-\alpha$, and since $\triangle C B L$ is isosceles with base $B L$, $\angle C B L=\angle C L B=90^{\circ}-45^{\circ}+\frac{\alpha}{2}$. Then we get that $\angle L B K=\angle A B K+\angle C B L-90^{\circ}=45^{\circ}$.

From this, it follows that $L N \| B K$ and $B L \| K M$. First, $K M$ is the midline in the isosceles triangle $C B L$, so $C K=K L=C M=M B=\frac{1}{2} B C$. Second, $K B N L$ is a trapezoid, and it is isosceles (since $\angle N B K=\angle B K L$). Triangle $K A B$ is isosceles by condition, and $K B N L$ is an isosceles trapezoid, so $K L=B N$ and $A L=A N$.

Thus, we have the equalities:

$$
\begin{gathered}
B N=K L=K C=M C=B M \\
A N=A L
\end{gathered}
$$

By the Pythagorean theorem for $\triangle A B C$:

$$
\begin{gathered}
B C^{2}+A B^{2}=A C^{2} \\
(B M+M C)^{2}+(B N+A N)^{2}=(C K+K L+L A)^{2}
\end{gathered}
$$

Using the known equalities, we get:

$$
\begin{gathered}
(B N+B N)^{2}+(B N+A N)^{2}=(B N+B N+A N)^{2} \\
4 B N^{2}+B N^{2}+2 B N \cdot A N+A N^{2}=4 B N^{2}+4 B N \cdot A N+A N^{2}
\end{gathered}
$$

After canceling the corresponding terms:

$$
B N^{2}=2 B N \cdot A N
$$

The length of segment $B N$ is not equal to 0, for example, because by condition $\angle B L N=45^{\circ}$, so we can divide the obtained equality by it:

$$
B N=2 A N
$$

In the end, we get the answer:

$$
A N: B N=1: 2
$$

## Criteria.

Attention: a picture with many marked angles is not a proof of anything, as it is impossible to reconstruct the order of angle calculations from it.

Full solution - 7 points.

Proven that $L N \| B K$ and $B L \| K M - 4$ points.