Prove that there do not exist positive integers $x$ and $y$ with $x^2 - y^2 = n$

A more or less mechanical approach is to work modulo $4$. Note that for any integer $k$, $k^2\equiv 0 \pmod{4}$ or $k^2\equiv 1\pmod{4}$.

So, modulo $4$, $x^2-y^2$ can only take on the values $0$, $1$, and $-1$.


More basic, and more useful, is to suppose that $x^2-y^2=n$. Then $(x-y)(x+y)=n$. Note that for any integers $x$ and $y$, the numbers $x-y$ and $x+y$ are both even or both odd. (If we want a proof, their difference $2y$ is even.)

In neither case is $(x-y)(x+y)$ twice an odd integer. You started along these lines. Note that you were one step from the end.

Remark: The reason the second idea is more useful is that when it comes to solving $x^2-y^2=n$, we express $n$ as a product $st$ of integers of the same parity, and solve the system $x-y=s$, $x+y=t$. The solution is $x=\frac{s+t}{2}$, $y=\frac{s-t}{2}$. If $n$ is twice an odd integer, then this process breaks down, because one of $s$ and $t$ will be odd and the other even, so we do not get integers $x$ and $y$.


HINT

  1. $x^2 - y^2 = (x-y)(x+y)$
  2. If $x-y$ is even, then so is $x+y$

For every integer $x$, $x^2=0$ or $1\pmod{4}$. Hence, for every integers $x$ and $y$, $x^2-y^2=1$ or $0$ or $-1\pmod{4}$. On the other hand, if $n=2(2k+1)$ for some integer $k$, $n=2\pmod{4}$. Hence, $x^2-y^2=n\pmod{4}$ with $n$ twice an odd integer is impossible.