4. Quadrilateral $ABCD$ is inscribed in a circle of radius 6. The rays $AB$ and $DC$ intersect at point $P$, and the rays $BC$ and $AD$ intersect at point $Q$. It is known that triangles $ADP$ and $QAB$ are similar (vertices are not necessarily in the corresponding order).

a) Find $AC$.

b) Suppose additionally that the circles inscribed in triangles $ABC$ and $ACD$ touch the segment $AC$ at points $K$ and $T$ respectively, and that $CK: KT: TA = 2: 1: 3$ (point $T$ lies between $K$ and $A$). Find $\angle DAC$ and the area of quadrilateral $ABCD$.
Answer. a) $A C=12 ;$ b) $\angle D A C=45^{\circ}, S_{A B C D}=68$.

Solution. a) Similarity of triangles is equivalent to the equality of all their angles. Since the angle at vertex $A$ is common to both triangles, there are two options: either $\angle A B Q=\angle A D P, \angle A Q B=\angle A P D$, or $\angle A B Q=\angle A P D$, $\angle A Q B=\angle A D P$. The second case is impossible, since $\angle A D P$ is the external angle of triangle $C D Q$, so it equals the sum of $\angle D C Q+\angle D Q C$, i.e., $\angle A D P>\angle A Q B$. Therefore, only the first case remains, and $\angle A B C=\angle A D C$. Since quadrilateral $A B C D$ is inscribed in a circle, $\angle A B C+\angle A D C=180^{\circ}$, from which $\angle A B C=\angle A D C=90^{\circ}$. Consequently, $A C$ is the diameter of the circle, $A C=12$.

b) Let the circle inscribed in triangle $A B C$ touch its sides $A B$ and $B C$ at points $M$ and $N$, respectively, and the circle inscribed in triangle $A C D$ touch its sides $A D$ and $C D$ at points $L$ and $G$, respectively. Note that under the additional condition $A T=T C$. By the property of tangent segments to a circle, $A L=A T=T C=C G, D G=D L$. Therefore, triangle $A C D$ is isosceles, and since $\angle D=90^{\circ}$, $\angle D A C=45^{\circ}$. The area of triangle $A C D$ is $0.5 A C \cdot D T=16$.

Now apply the property of tangents to triangle $A B C$: $C N=C K=4, A M=A K=8$; let $B N=B M=x$. By the Pythagorean theorem for triangle $A B C$, we get $144=(x+4)^{2}+(x+8)^{2}, x^{2}+12 x-32=0, x=\sqrt{68}-6$. Then $A B=\sqrt{68}+2, B C=\sqrt{68}-2$ and the area of triangle $A B C$ is $0.5 A B \cdot B C=32$. Therefore, the area of quadrilateral $A B C D$ is $36+32=68$.