2. (16 points) Aunt Masha decided to bake a cake. She mixed the dough, which according to the recipe includes flour, butter, and sugar in the weight ratio of $3: 2: 1$, and mixed butter with sugar for the cream in the ratio of $2: 3$. Changing her mind about baking the cake, she combined both mixtures, added 300 g of flour, and prepared dough for cookies, in which flour, butter, and sugar are in the ratio of 5:3:2. How much flour did Aunt Masha use? Write the answer in grams.
Answer: 1200.

Solution. Let the dough for the cake contain flour, butter, and sugar in the amounts of $3x$, $2x$, and $x$ respectively, and the cream contain butter and sugar in the amounts of $2y$ and $3y$ respectively. Using the ratios for the cookies, we get the system of equations $\left\{\begin{array}{l}\frac{3x+300}{2x+2y}=\frac{5}{3}, \\ \frac{2x+2y}{x+3y}=\frac{3}{2} .\end{array}\right.$

We find that $x=300, y=60$. Thus, Aunt Masha spent $3x+300=900+300=1200$ grams of flour.

3. (17 points) In a right triangle, the legs are 5 and 12. Find the distance between the centers of the inscribed and circumscribed circles. Write the square of this distance in the answer.

Answer: 16.25.

Solution. By the Pythagorean theorem, the hypotenuse is 13, and the area of the triangle is $S=\frac{1}{2} \cdot 5 \cdot 12=30$. The semiperimeter $p=\frac{5+12+13}{2}=15$, so the radius of the inscribed circle $r=\frac{s}{p}=2$. Let $O_{1}$ be the center of the inscribed circle, $O_{1}P$ and $O_{1}K$ be the radii of the inscribed circle, drawn to the leg and the hypotenuse at the points of tangency of the circle, with legs $BC=12, AC=5$ by the problem statement. We have $BP=BC-r=12-2=10$. By the property of tangents drawn from one point to a circle, $BK=BP=10$. The center of the circumscribed circle $O_{2}$ around the right triangle lies at the midpoint of the hypotenuse and $BO_{2}=6.5$.

![](https://cdn.mathpix.com/cropped/2024_05_06_6b90c54680aad409e6d2g-5.jpg?height=348&width=417&top_left_y=1294&top_left_x=891)

In the right triangle $KO_{1}O_{2}$, we have $KO_{2}=10-6.5=3.5, KO_{1}=r=2, O_{1}O_{2}$ is the desired distance. By the Pythagorean theorem, $O_{1}O_{2}^2=4+12.25=16.25$.