Proving that the range of two functions is disjoint and the union of the ranges is the entire set of natural numbers. Define, where $x$ and $y$ are non-negative integers:
$f(x,y)=x^2 + 2x(y + 1) + y^2 + y + 1$
$g(x,y)=x^2 + 2x(y + 1) + y^2 + 3y + 2$
Prove that the range of $f(x,y)$ is disjoint from the range of $g(x,y)$ and that the union of the ranges is the entire set of natural numbers.
What I have attempted so far:
To prove that the ranges are disjoint, I tried to find when $f(x,y)=g(x,y)$. This only occurs when
$y=-\frac{1}{2}$, which is not a non-negative integer. However, I don't think it proves the ranges are disjoint, as it only shows there isn't an ordered pair which gives the same value for both functions, not that the two functions never output the same value.
For the second part of the problem (and possibly the first part) re-writing both formulas using some clever factorisation might reveal something. For example, $f(x,y)=(x+y+1)^2-y$ and $g(x,y)=(x+y+1)^2+y+1$. However, I am not quite sure how to utilise this.
Any hints for either part of the problem?
 A: *

*Let us prove that the range of $f(x,y)$ is disjoint from the range of $g(x,y)$.

On the contrary, let there exist a natural number $m$ such that $f(x,y)=m=g(u,v)$,
where $x,y,u,v\in \mathbb{N}=\{0,1,2,\ldots\}$.
Then
$$
(x+y+1)^2-y=(u+v+1)^2+v+1\Leftrightarrow
$$
$$
(x+y+u+v+2)(x+y-u-v)=y+v+1.
$$
Let
$$
\begin{array}{l}
  p=x+y+u+v+2, \\
  q=x+y-u-v.
\end{array}\tag{1}
$$
Then
$$
y+v+1=pq.\tag{2}
$$
Since $y+v+1>0$, we have $q>0$.
It follows from (1) and (2) that
$$
p=x+y+u+v+2=x+u+1+pq\geq pq+1.
$$
So $p\geq pq+1$. We obtained a contradiction.


*Let us prove that the union of the ranges $f(x,y)$ and $g(x,y)$ is
the entire set of natural numbers other than $0$.

Here it is convenient to deal with the expressions
$$
f(x,y)=(x+y+1)^2-y,\ g(x,y)=(x+y+1)^2+y+1.
$$
Let $m\in \mathbb{N}$ and $m>0$.
We choose $k\in \mathbb{N}$, $k\geq1$, so that $k^2\leq m<(k+1)^2$.
We will consider several cases:
$(i)$ If $m=k^2$, then $f(k-1,0)=m$.
$(ii)$ If $k^2+1\leq m\leq k^2+k$, then $g(k^2+k-m,m-k^2-1)=m$.
$(iii)$ If $k^2+k+1\leq m<(k+1)^2$, then $f(m-k^2-k-1,(k+1)^2-m)=m$.
