Let $a,b \in \mathbb{R}$ such that $a^2\geq b$. Prove that $\sqrt{a+\sqrt{b}}+\sqrt{a-\sqrt{b}}$ is rational if and only if $a^2-b$ and $\frac{1}{2}(a+\sqrt{a^2-b})$ are square.
$\Rightarrow$)
$\begin{align*} \sqrt{a+\sqrt{b}}+\sqrt{a-\sqrt{b}}&= \frac{p}{q}\\ 2a+2\sqrt{a^2-b}&=\frac{p^2}{q^2}\\ \frac{1}{2}(a+\sqrt{a^2-b})&=\frac{p^2}{(2q)^2} \end{align*}$
but I don't know how to relationate $a^2-b$
$(\Leftarrow$
$\begin{align*} n&=\frac{a+\sqrt{a^2-b}}{2}\\ &=\frac{(a+\sqrt{b})+2\sqrt{a^2+b}+(a-\sqrt{b})}{4}=\left(\frac{\sqrt{a+\sqrt{b}}+\sqrt{a-\sqrt{b}}}{2}\right)^2 \end{align*}$
then $\sqrt{n}=\frac{\sqrt{a+\sqrt{b}}+\sqrt{a-\sqrt{b}}}{2}$
but again I don't know what to do with $a^2-b$
Assuming "square" means square of a rational (otherwise any positive real is the square of a real number), it's not true if $a$ and $b$ are not assumed rational. For example, with $0 < b < 1/4$ and $a = b + 1/4$ we have $\sqrt{a+\sqrt{b}}+\sqrt{a-\sqrt{b}} = 1$.