Q:

Find all $n\in \mathbb N$ such that $\sqrt{n}+\sqrt{n+m}\in\mathbb{N}$, where $m$ is the product of two primes that are not equal to each other. 

I have the following problem:
Find all $n$ that are natural numbers such that $\sqrt{n}+\sqrt{n+m}\in\mathbb{N}$, where $m$ is a positive natural number that is the product of two primes that are not equal to each other. 
I thought that I can solve it when the function under the square roots are squares of integers but I have no idea how to prove that or how to continue. 

A:

Assignment:
Find all $\text{n}\in\mathbb{N}$ such that $\sqrt{\text{n}}+\sqrt{\text{n}+\text{m}}\in\mathbb{N}$, where $\text{m}\in\mathbb{N}^+$ and $\text{m}=\text{p}_1\cdot\text{p}_2$ where $\text{p}_1\wedge\text{p}_2\in\mathbb{P}$ and $\text{p}_1<\text{p}_2$.

Solution:
Notice that when $\text{n}$ and $\text{n}+\text{m}$ are both perfect squares, the requirements are met. 
So, let $\text{n}=\text{y}^2$ and $\text{n}+\text{m}=x^2$. Than we know that:
$$x^2-\text{y}^2=\left(x+\text{y}\right)\left(x-\text{y}\right)=\text{n}+\text{m}-\text{n}=\text{m}\tag1$$
Now, let's look at a few cases:

Case 1:

Write $\left(x+\text{y}\right)\left(x-\text{y}\right)=\text{m}$ as: $\left(x+\text{y}\right)\left(x-\text{y}\right)=\text{m}\cdot 1$. Because we know that $x$, $\text{y}$ and $\text{m}$ are positive integers we also know that:
$$
\begin{cases}
x+\text{y}=\text{m}\\
\\
x-\text{y}=1
\end{cases}\space\space\space\Longleftrightarrow\space\space\space\begin{cases}
x=\frac{\text{m}+1}{2}\\
\\
\text{y}=\frac{\text{m}-1}{2}
\end{cases}\tag2
$$
This implies that:
$$\text{n}=\text{y}^2=\left(\frac{\text{m}-1}{2}\right)^2\tag3$$
So, we get:
$$\sqrt{\text{n}}+\sqrt{\text{n}+\text{m}}=\sqrt{\left(\frac{\text{m}-1}{2}\right)^2}+\sqrt{\left(\frac{\text{m}-1}{2}\right)^2+\text{m}}=$$
$$\sqrt{\left(\frac{\text{m}-1}{2}\right)^2}+\sqrt{\left(\frac{\text{m}+1}{2}\right)^2}=\frac{\text{m}-1}{2}+\frac{\text{m}+1}{2}=\text{m}\tag4$$

Case 2:

Write $\left(x+\text{y}\right)\left(x-\text{y}\right)=\text{m}$ as: $\left(x+\text{y}\right)\left(x-\text{y}\right)=\text{p}_1\cdot\text{p}_2$. Because we know that $x$, $\text{y}$ and $\text{m}$ are positive integers we also know that:
$$
\begin{cases}
x+\text{y}=\text{p}_2\\
\\
x-\text{y}=\text{p}_1
\end{cases}\space\space\space\Longleftrightarrow\space\space\space\begin{cases}
x=\frac{\text{p}_1+\text{p}_2}{2}\\
\\
\text{y}=\frac{\text{p}_2-\text{p}_1}{2}
\end{cases}\tag5
$$
This implies that:
$$\text{n}=\text{y}^2=\left(\frac{\text{p}_2-\text{p}_1}{2}\right)^2\tag6$$
So, we get:
$$\sqrt{\text{n}}+\sqrt{\text{n}+\text{m}}=\sqrt{\left(\frac{\text{p}_2-\text{p}_1}{2}\right)^2}+\sqrt{\left(\frac{\text{p}_2-\text{p}_1}{2}\right)^2+\text{p}_1\cdot\text{p}_2}=$$
$$\sqrt{\left(\frac{\text{p}_2-\text{p}_1}{2}\right)^2}+\sqrt{\left(\frac{\text{p}_1+\text{p}_2}{2}\right)^2}=\frac{\text{p}_2-\text{p}_1}{2}+\frac{\text{p}_1+\text{p}_2}{2}=\text{p}_2\tag7$$

Now, I let you prove if these are the only solutions.  HINT: write $\text{k}=\sqrt{\text{n}}+\sqrt{\text{n}+\text{m}}$ and solve for $\text{n}$, which gives:
$$\text{n}=\frac{1}{4}\left(\text{k}-\frac{\text{m}}{\text{k}}\right)^2\tag8$$

