163*. Find the condition under which the expression $\sqrt{A \pm \sqrt{\bar{B}}}$ can be represented in the form of a binomial $\sqrt{x} \pm \sqrt{y}$, where $x$ and $y$ are rational numbers.
Solution. Let

$$
\sqrt{A+\sqrt{B}}=\sqrt{x}+\sqrt{y}
$$

then from the previous problem,

$$
\sqrt{A-\sqrt{B}}=\sqrt{x}-\sqrt{y}
$$

Multiplying equations (1) and (2), we get:

$$
\sqrt{A+\sqrt{B}} \cdot \sqrt{A-\sqrt{B}}=(\sqrt{x}+\sqrt{y}) \cdot(\sqrt{x}-\sqrt{y})
$$

or

$$
\sqrt{A^{2}-B}=x-y
$$

Squaring equation (1), we get:

$$
A+\sqrt{B}=x+y+2 \sqrt{x y}
$$

from which

$$
A=x+y
$$

Equations (3) and (4) form a system of two linear equations with two unknowns:

$$
\left\{\begin{array}{l}
x-y=\sqrt{A^{2}-B} \\
x+y=A
\end{array}\right.
$$

from which

$$
\begin{aligned}
& x=\frac{A+\sqrt{A^{2}-B}}{2} \\
& y=\frac{A-\sqrt{A^{2}-B}}{2}
\end{aligned}
$$

Thus,

$$
\sqrt{A \pm \sqrt{B}}=\sqrt{x} \pm \sqrt{y}=\sqrt{\frac{A+\sqrt{A^{2}-B}}{2}} \pm \sqrt{\frac{A-\sqrt{A^{2}-B}}{2}}
$$

Therefore, $\sqrt{A \pm \sqrt{B}}$ can always be represented as the sum or difference of two roots of the form $\sqrt{x}, \sqrt{y}$. However, for $x$ and $y$ to also be rational, it is necessary that the expression $A^{2}-B$ be a perfect square.