7. A circle is inscribed in trapezoid $A B C D$, touching the lateral side $A B$ at point $M$, and the lateral side $C D$ at point $K$, with $A M=9, C K=3$. Find the diagonals of the trapezoid, if its perimeter is 56.
Solution: $M, E, K, F$ are the points of tangency of the circle with sides $A B, B C, C D, A D$ respectively. Then

$$
A M=A F=a=9
$$

$$
B M=B E=x, \quad C E=C K=y=3,
$$

$D K=D F=z$.

$$
\begin{aligned}
& P_{A B C D}=2(9+x+3+z)=56 \\
& x+z=16
\end{aligned}
$$

Let $B P \perp A D, C N \perp A D$.

![](https://cdn.mathpix.com/cropped/2024_05_06_331dee27c7cee369cafag-19.jpg?height=462&width=991&top_left_y=1899&top_left_x=881)

In triangle $A B P$ by

the Pythagorean theorem we have: $h^{2}+(a-x)^{2}=(a+x)^{2}, h^{2}=4 a x$. In triangle $C D N$ by the Pythagorean theorem we have: $h^{2}+(z-y)^{2}=(z+y)^{2}, h^{2}=4 y z$. Then $a x=y z, 3 x=z$. Since $x+z=16$, then
$x=4, z=12$. We find the sides of the trapezoid $A B=13, B C=7, C D=15, A D=21$ and the height $h=12$. From triangle $D B P$ we have by the Pythagorean theorem we find $B D$ :

$$
B D^{2}=B P^{2}+P D^{2}=h^{2}+(x+z)^{2}=12^{2}+16^{2}=400, B D=20
$$

From triangle $C A N$ by the Pythagorean theorem we find $A C$ :

$A C^{2}=A N^{2}+C N^{2}=(a+y)^{2}+h^{2}=12^{2}+12^{2}=288, A C=12 \sqrt{2}$.

Answer: $A C=12 \sqrt{2}, B D=20$.