6. Find all values of the parameter $a$ for which the system $\left\{\begin{array}{l}4|x|+3|y|=12, \\ x^{2}+y^{2}-2 x+1-a^{2}=0\end{array} \quad\right.$ a) has exactly 3 solutions; b) has exactly 2 solutions.
Answer. a) $|a|=2$; b) $|a| \in\left\{\frac{8}{5}\right\} \bigcup\left(2 ; \frac{16}{5}\right) \bigcup\{\sqrt{17}\}$.

Solution. The first equation of the system does not change when $x$ is replaced by $-x$ and/or $y$ is replaced by $-y$. Therefore, the set of points defined by the first equation is symmetric with respect to both coordinate axes. In the first quadrant, we get a part of the line $y=4-\frac{4}{3} x$ - a segment connecting the points $(3 ; 0)$ and $(0 ; 4)$. Using the symmetry of the set with respect to the coordinate axes, we obtain a rhombus with vertices $A(3 ; 0), B(0 ; 4)$, $C(-3 ; 0), D(0 ;-4)$.

The second equation of the system can be written as $(x-1)^{2}+y^{2}=a^{2}$. It defines a circle with center $Q(1 ; 0)$ and radius $|a|$ (or the point $Q$ if $a=0$). When $a=0$, there are no solutions, so let's consider the case of a circle.

a) Both the rhombus and the circle are symmetric with respect to the x-axis, so 3 solutions are possible only if one of the common points of the circle and the rhombus lies on the x-axis. This happens if the radius of the circle is equal to the segment $Q A$ or the segment $Q C$, i.e., $|a|=2$ or $|a|=4$. It is easy to see that when $|a|=2$, the system has 3 solutions, and when $|a|=4$, it has 5 solutions. Therefore, 3 solutions are possible only when $a= \pm 2$.

b) Let $R_{0}$ be the radius of the circle that is tangent to sides $B C$ and $C D$, and $R_{1}$ be the radius of the circle that is tangent to sides $A B$ and $A D$ of the rhombus. The system has exactly two solutions if and only if $|a| \in\left\{R_{1}\right\} \cup\left(Q A ; R_{0}\right) \cup\{Q B\}$.

$Q A=2, Q B=\sqrt{4^{2}+1^{2}}=\sqrt{17}$. Let the circle of radius $R_{1}$ touch side $A B$ at point $J$, and the circle of radius $R_{0}$ touch side $B C$ at point $L$. Triangle $C L Q$ is a right triangle, $\operatorname{tg} \angle C$ is the slope of the line $B C$, i.e., $\operatorname{tg} \angle C=\frac{4}{3}$. Then $C L=\frac{L Q}{\operatorname{tg} \angle C}=\frac{3 R_{0}}{4}$. By the Pythagorean theorem for triangle $C L Q$, we get $16=R_{0}^{2}+\frac{9 R_{0}^{2}}{16}$, from which $R_{0}=\frac{16}{5}$. Since triangles $J Q A$ and $L Q C$ are similar and the similarity ratio is $\frac{Q A}{Q C}=\frac{1}{2}$, then $R_{1}=Q J=\frac{1}{2} Q L=\frac{8}{5}$. Finally, we get $|a| \in\left\{\frac{8}{5}\right\} \bigcup\left(2 ; \frac{16}{5}\right) \bigcup\{\sqrt{17}\}$.