Why $\sqrt{23-\sqrt{17}}-2\sqrt{7-\sqrt{17}}=\sqrt{71-17\sqrt{17}}$ is true? Easy to show this identity after squaring twice of the both sides.
But why it turned out true?
For example, if we want to prove that
$$\sqrt{23-3\sqrt{5}}-2\sqrt{3-\sqrt{5}}=\sqrt{3+\sqrt{5}},$$
we can do it without squaring:
$$\sqrt{23-3\sqrt{5}}-2\sqrt{3-\sqrt{5}}=\frac{1}{\sqrt{2}}\left(\sqrt{46-6\sqrt{5}}-2\sqrt{6-2\sqrt{5}}\right)=$$
$$=\frac{1}{\sqrt{2}}\left(\sqrt{(3\sqrt{5}-1)^2}-2\sqrt{(\sqrt5-1)^2}\right)=\frac{1}{\sqrt{2}}\left(3\sqrt{5}-1-2(\sqrt{5}-1)\right)=$$
$$=\frac{1}{\sqrt{2}}(\sqrt{5}+1)=\frac{1}{\sqrt{2}}\sqrt{6+2\sqrt{5}}=\sqrt{3+\sqrt{5}}.$$
But this way does not work for the starting identity. 
How to prove the starting identity without squaring? 
Thank you!  
 A: Note that
$$\sqrt{23-\sqrt{17}}=\sqrt{7-\sqrt{17}}\sqrt{\frac{9+\sqrt{17}}2}=\frac{1+\sqrt{17}}{2}\sqrt{7-\sqrt{17}}.$$
A: It still works, albeit cumbersome 
\begin{align}
& \sqrt{23-\sqrt{17}}-2\sqrt{7-\sqrt{17}}\\
= & \frac12 \sqrt{\left(\sqrt{1775-425\sqrt{17}} +\sqrt{1207-289\sqrt{17}} \right)^2}
-\frac12 \sqrt{\left(\sqrt{639-153\sqrt{17}} +\sqrt{1207-289\sqrt{17}} \right)^2}\\
= & \frac52 \sqrt{71-17\sqrt{17}} +\frac12\sqrt{1207-289\sqrt{17}}
-\frac32 \sqrt{71-17\sqrt{17}} -\frac12 \sqrt{1207-289\sqrt{17}} \\
=&\left( \frac52-\frac32\right) \sqrt{71-17\sqrt{17}}\\
=& \sqrt{71-17\sqrt{17}}\\
\end{align}
A: Thumb rule to merge any two irrationals: $\boxed{\color{red}{\sqrt{a}\pm\sqrt{b}=\sqrt{(\sqrt{a}\pm\sqrt{b})^2}} \quad \forall \  \color{blue}{a>b}}$ 
$$\therefore \sqrt{23-\sqrt{17}}-2\sqrt{7-\sqrt{17}}$$
$$=\sqrt{\left(\sqrt{23-\sqrt{17}}-2\sqrt{7-\sqrt{17}}\right)^2}$$
$$=\sqrt{23-\sqrt{17}+4(7-\sqrt{17})-4\sqrt{(23-\sqrt{17})(7-\sqrt{17})}}$$
$$=\sqrt{23-\sqrt{17}+4(7-\sqrt{17})-4\sqrt{(23-\sqrt{17})(7-\sqrt{17})}}$$
$$=\sqrt{51-5\sqrt{17}-4\sqrt{178-30\sqrt{17}}}$$
$$=\sqrt{51-5\sqrt{17}-4\sqrt{178-2\cdot 5\cdot 3\sqrt{17}}}$$
$$=\sqrt{51-5\sqrt{17}-4\sqrt{(3\sqrt{17}-5)^2}}$$
$$=\sqrt{51-5\sqrt{17}-4(3\sqrt{17}-5)}$$
$$=\sqrt{51-5\sqrt{17}-12\sqrt{17}+20}$$
$$=\sqrt{71-17\sqrt{17}}$$
Proved.
A: It is already said everything about the solution, but i was curious to see if there is any "straightforward" way to proceed in this and similar cases by working in the appropriate quadratic field, here in $K=\Bbb Q(s)$, with $s=\sqrt {17}$ (with class number one) and asking the computer, here sage, for factorizations of the numbers under the radicals. It gave the decompositions:
$$
\begin{aligned}
23 -s &= (4+s)^3\cdot\frac{s+3}2\cdot\left(\frac{s-3}2\right)^8\ ,\\
 7 -s &= (4+s)\cdot\frac{s+3}2\cdot\left(\frac{s-3}2\right)^4\ ,\\
71 -17s &= (4+s)\cdot\frac{s+3}2\cdot\left(\frac{s-3}2\right)^6\ ,
\end{aligned}
$$
and each R.H.S. above is of the shape a common factor
$f=(4+s)\cdot\left(\frac{s+3}2\right)\cdot\left(\frac{s-3}2\right)^4$, taken
times the one or the other square element in $K$. The square root of the common factor $f$ takes us out of $K$, but after factorizing it, the posted equality lives in $K$ and is:
$$
(4+s)\cdot\left(\frac{s-3}2\right)^2
-
2
=
\left(\frac{s-3}2\right)
\ .
$$
Easily checked.

Code used to reproduce the above:
K.<s> = QuadraticField(17)
print(f'K has class number {K.class_number()}.')
for r in (23 - s, 7 - s, 71 - 17*s):
    print(f'{r} = {r.factor()}') 

Results:
K has class number 1.
-s + 23 = (-65*s - 268) * (-1/2*s - 3/2) * (-1/2*s + 3/2)^8
-s + 7 = (-s - 4) * (-1/2*s - 3/2) * (-1/2*s + 3/2)^4
-17*s + 71 = (-s - 4) * (-1/2*s - 3/2) * (-1/2*s + 3/2)^6

The factor $(65s-268)$ is an integral unit, and thus a power of the generator $(4+s)$, which is easily found. The final check:
sage: (4 + s)*( (s-3)/2 )^2 - 2 == (s-3)/2
True

