2. Inside the square $A B C D$ with a side length of 5, there is a point $X$. The areas of triangles $A X B, B X C$, and $C X D$ are in the ratio $1: 5: 9$. Find the sum of the squares of the distances from point $X$ to the sides of the square.
Solution:

Let the side of the square be $a=5$, and the distances from point $X$ to sides $AB$, $BC$, $CD$, and $DA$ be $h_{1}$, $h_{2}$, $h_{3}$, and $h_{4}$, respectively. Since the area of a triangle is $S=\frac{1}{2} a h$, we conclude that $h_{1}: h_{2}: h_{3}=1: 5: 9$ or $h_{1}=x$, $h_{2}=5 x, h_{3}=9 x$. However, the sums of the distances from a point inside the square to the sides are equal to the side of the square, $h_{1}+h_{3}=h_{2}+h_{4}=a$, then $h_{1}=\frac{1}{10} a, h_{2}=\frac{5}{10} a=\frac{1}{2} a$, $h_{3}=\frac{9}{10} a, h_{4}=\frac{5}{10} a=\frac{1}{2} a$. We get that $h_{1}^{2}+h_{2}^{2}+h_{3}^{2}+h_{4}^{2}=a^{2}\left(\frac{1}{100}+\frac{1}{4}+\frac{81}{100}+\frac{1}{4}\right)=25 \cdot \frac{132}{100}=33$.

Answer: 33.