6. In the right-angled triangle $ABC$ with the right angle at vertex $B$, on the longer leg $BC$, a segment $BD$ equal to the shorter leg is laid off from point $B$. Points $K$ and $N$ are the feet of the perpendiculars dropped from points $B$ and $D$ to the hypotenuse, respectively. Find the length of segment $BK$, if $AK=ND=2$.
Solution:

Drop a perpendicular from point $D$ to segment $B K$, let the foot of this perpendicular be point $M$. Then the right triangles $A K B$ and $B M D$ are equal by hypotenuse and acute angle, therefore, $B M=A K=2$. Quadrilateral $M K N D$ is a rectangle and $M K=N D=2$, then $B K=B M+M K=2+2=4$.

Answer: 4.