# 7.

1) $\angle A P B=\angle B A C, \angle A P B=\angle A K C, \angle A K C=\angle B A C, \angle K A C=\angle A B C$.

Segment $A C$ is a tangent segment to the circle.

$\triangle A B C \approx \triangle A K C \Rightarrow$

$\frac{A B}{A K}=\frac{A C}{K C}=\frac{B C}{A C} \Rightarrow \frac{A B}{4}=\frac{A C}{3}=\frac{12}{A C} \Rightarrow A C=6, \quad A B=8$.
2) $C D$ is a median $\Rightarrow$ by the cosine theorem for triangles $A D C$ and $B D C$ we have:

$A C^{2}=A D^{2}+C D^{2}-2 A D \cdot C D \cos \angle A D C, \quad B C^{2}=B D^{2}+C D^{2}+2 B D \cdot C D \cos \angle A D C$.

Since $A D=B D$, then $A C^{2}+B C^{2}=2 A D^{2}+2 C D^{2}$,

$C D^{2}=\frac{1}{2}\left(A C^{2}+B C^{2}\right)-A D^{2}=\frac{1}{2}(36+144)-16=74, C D=\sqrt{74}$.

3) Let $D P=x, D N=y$ ( $N$ is the intersection point of line $C D$ with the circle, $N \neq P$ ).

Quadrilateral $A N B P$ is inscribed in the circle $\Rightarrow A D \cdot D B=P D \cdot B T, \quad 16=x y$. By the properties of tangents and secants to the circle we have $C N \cdot C P=A C^{2},(C D-y) \cdot(C D+x)=A C^{2}$, $(\sqrt{74}-y) \cdot(\sqrt{74}+x)=36$

4) Solving the system of equations $16=x y, \quad(\sqrt{74}-y) \cdot(\sqrt{74}+x)=36 \Rightarrow y=\frac{22}{\sqrt{74}}+x \Rightarrow$ $x^{2}+\frac{22}{\sqrt{74}} x-16=0, x=\frac{-11+3 \sqrt{145}}{\sqrt{74}}, D P=\frac{-11+3 \sqrt{145}}{\sqrt{74}}$.
Answer: $\frac{-11+3 \sqrt{145}}{\sqrt{74}}$.

![](https://cdn.mathpix.com/cropped/2024_05_06_331dee27c7cee369cafag-05.jpg?height=757&width=1059&top_left_y=1095&top_left_x=607)