Gerkо A.A.

On the sides of triangle $ABC$, squares $ABMN, BCKL, ACQP$ are constructed outwardly. On segments $NQ$ and $PK$, squares $NQZT$ and $PKXY$ are constructed. The difference in the areas of squares $ABMN$ and $BCKL$ is $d$. Find the difference in the areas of squares $NQZT$ and $PKXY$

a) in the case where angle $ABC$ is a right angle,

b) in the general case.
According to the Law of Cosines (see the figure), $N Q^{2}=A N^{2}+A Q^{2}-2 A N \cdot A Q \cos \angle N A Q=A B^{2}+A C^{2}+2 A B \cdot B C \cos \angle A$, $B C^{2}=A B^{2}+A C^{2}-2 A B \cdot B C \cos \angle A$. Therefore, $N Q^{2}+B C^{2}=2 A B^{2}+2 A C^{2}$.

Similarly, $P K^{2}+A B^{2}=2 B C^{2}+2 A C^{2}$. Hence, $N Q^{2}-P K^{2}=3\left(A B^{2}-B C^{2}\right)=3 d$.

![](https://cdn.mathpix.com/cropped/2024_05_06_76207e7feb35677daaaeg-24.jpg?height=829&width=834&top_left_y=0&top_left_x=615)