6. a) On the coordinate plane, plot the figure $\Phi$, the coordinates of the points of which satisfy the system of inequalities

$$
\left\{\begin{array}{l}
x^{2}-y^{2} \leqslant 2(x-y) \\
x^{2}+y^{2} \leqslant 4(x+y-1)
\end{array}\right.
$$

b) Find the area of the figure $\Phi$ and the distance from the point $T(0 ; 4)$ to the nearest point of the figure $\Phi$.
Answer. $S=2 \pi ; \rho=2 \sqrt{2}-2$.

Solution. Transform the first inequality: $(x-y)(x+y)-2(x-y) \leqslant 0 \Leftrightarrow(x-y)(x+y-2) \leqslant 0$. It defines two vertical angles, the boundaries of which are the lines $y=x$ and $y=2-x$ (the points $(0 ; \pm 10)$ lie inside these angles). The second inequality can be rewritten as $(x-2)^{2}+(y-2)^{2} \leqslant 4$. It defines a circle with center $G(2 ; 2)$ and radius 2. The intersection of these two sets is the desired set.

The figure $\Phi$ constitutes exactly half of a circle with radius 2, so its area is $\frac{1}{2} \cdot 4 \pi=2 \pi$. Mark the point $E$ where the segment $G T$ intersects the circle. $T E$ is the shortest distance from point $T$ to the figure $\Phi$. $T E=T G-G E=2 \sqrt{2}-2$.