## Task B-3.4.

Over the sides of a right-angled triangle with legs of lengths $a, b$, squares are constructed outward. Calculate (in terms of $a$ and $b$) the area of the triangle whose vertices are at the centers of the constructed squares.
## First Solution.

![](https://cdn.mathpix.com/cropped/2024_05_30_1020492bf6e1d2c949fdg-13.jpg?height=994&width=853&top_left_y=314&top_left_x=610)

We need to calculate the area of triangle \(MNP\). The length of side \(\overline{MN}\) is

\[
|MN| = |MC| + |CN| = \frac{a \sqrt{2} + b \sqrt{2}}{2}
\]

Triangles \(ATA_1\) and \(BCA\) are congruent \(\left(|AB| = |AA_1|, \angle A_1AT = \angle ABC\right.\), both triangles are right-angled).

Then \(\overline{PP_1}\) is the midline of trapezoid \(CTA_1B\) and it holds that \(\left|PP_1\right| = \frac{a + b}{2}\), and on the other hand,

\[
\left|CP_1\right| = \frac{1}{2}|CT| = \frac{1}{2}(a + b)
\]

In the right-angled triangle \(CP_1P\), two sides are equal, so their opposite angles are \(45^\circ\). We conclude that \(\angle PCN = 90^\circ\) (since the sum of two \(45^\circ\) angles is \(90^\circ\)), and \(\overline{PC}\) is the height of triangle \(MNP\). Therefore, the area of triangle \(MNP\) is

\[
P = \frac{|MN| \cdot |PC|}{2} = \frac{1}{2} \cdot \frac{a \sqrt{2} + b \sqrt{2}}{2} \cdot \frac{\sqrt{2}(a + b)}{2} = \frac{(a + b)^2}{4}
\]