2. The vertices of one square lie on the sides of another square (one vertex on each side). Find the ratio in which the sides of the second square are divided by the vertices of the first square, if the ratio of their areas is equal to $p$, $(p<1)$.
Solution. Let $ABCD$ and $KLMN$ be the given squares, such that $K, L, M$ and $N$ lie on the sides $AB, BC, CD$ and $DA$, respectively. We will introduce the notations $\overline{BL}=y$, $\overline{KB}=x, \overline{KL}=b$ and $\overline{AB}=a$, and we can assume $x>y$. Then

$$
P_{1}=P_{ABCD}=a^{2}=(x+y)^{2},
$$

and according to the Pythagorean theorem $b^{2}=x^{2}+y^{2}$, so

$$
P_{2}=P_{KLMN}=b^{2}=x^{2}+y^{2}
$$

From the condition of the problem $\frac{P_{2}}{P_{1}}=\frac{x^{2}+y^{2}}{(x+y)^{2}}=p$, where $0<p<1$. The equation $\frac{x^{2}+y^{2}}{(x+y)^{2}}=p$ can be written in the form

$$
\begin{array}{ll}
(1-p) x^{2}-2 p x y+(1-p) y^{2}=0 & /: y^{2} \\
(1-p)\left(\frac{x}{y}\right)^{2}-2 p \frac{x}{y}+(1-p)=0
\end{array}
$$

If we introduce the notation $\frac{x}{y}=t$ we get

$$
(1-p) t^{2}-2 p t+(1-p)=0
$$

The solutions to the equation (1) are

$$
t_{1}=\frac{p+\sqrt{2 p-1}}{1-p}, \quad t_{1}=\frac{p-\sqrt{2 p-1}}{1-p}
$$

![](https://cdn.mathpix.com/cropped/2024_06_05_dd8561913dbd5a53296cg-05.jpg?height=390&width=372&top_left_y=800&top_left_x=1107)

It is clear that $\frac{x}{y}=\frac{p+\sqrt{2 p-1}}{1-p}$ is the desired solution.