$\frac{x^2+y^2}{x+y}$ is a divisor of $1978$ 
Two nonzero integers $x,y$ (not necessarily positive) are such that $x+y$ is a divisor of $x^2+y^2$, and the quotient $\dfrac{x^2+y^2}{x+y}$ is a divisor of $1978$. Prove that $x = y$.

Let $A = \dfrac{x^2+y^2}{x+y}$ where $A$ is an integer divisor of $1978$. Then $A \mid x^2+y^2$ and if $p$ is a prime divisor of $A$ we must have $x^2+y^2 \equiv 0 \pmod{p}$. 
We first deal with the case $x,y \equiv 0 \pmod{q}$. Otherwise $x,y \not \equiv 0 \pmod{q}$ where $q \equiv 3 \pmod{4}$ and is a prime divisor of $A$. 
I didn't find an easy way of dealing with the case that $x,y \equiv 0 \pmod{q}$. Is there an easier way of solving this?
 A: If a prime $p$ divides $x^2+y^2$ then $x^2\equiv -y^2$ modulo $p$ and thus, if $p$ does not divide both $x$ and $y$ we find that $-1$ is a quadratic residue modulo $p$. This cannot happen unless $p$ is of the form $4k+1$.
First let's suppose that $x,y$ are coprime. If they are not, then simply divide by their $gcd$ and find some $x',y'$ which are coprime and still satisfy the hypothesis. 
Now you know that $\frac{x^2+y^2}{x+y}$ divides $2\cdot 23\cdot 43$. If $23$ or $43$ divides $x^2+y^2$ then bot $x$ and $y$ have $23$ or $43$ as a factor, which contradicts the fact that they are coprime. This leaves us with
$x^2+y^2=2(x+y)$ which is equivalent to $(x-1)^2+(y-1)^2=2$. From here we see that $x=y=2$.
There is another case: $x^2+y^2 = x+y$ which implies $(2x-1)^2+(2y-1)^2 = 2$. This implies $x=y=1$.
A: For the equation.  
$$A=\frac{x^2+y^2}{x+y}$$
It may be better to write a decision?
$$x=(p-s)(k-s)$$
$$y=(p-s)(p-k)$$
$$A=p^2+s^2+2k(k-p-s)$$
A: $1978=2\cdot23\cdot43$.
As shown in this answer:

a prime $p\equiv3\pmod{4}$ divides $a^2+b^2$ ... implies that $p\,|\,a$ and $p\,|\,b$.

If $\left.23\,\middle|\,\frac{x^2+y^2}{x+y}\right.$, then $x=23u$ and $y=23v$ and $\frac{x^2+y^2}{x+y}=23\frac{u^2+v^2}{u+v}$. Then $\frac{u^2+v^2}{u+v}$ is a factor of $2\cdot43$.
If $\left.43\,\middle|\,\frac{x^2+y^2}{x+y}\right.$, then $x=43u$ and $y=43v$ and $\frac{x^2+y^2}{x+y}=43\frac{u^2+v^2}{u+v}$. Then $\frac{u^2+v^2}{u+v}$ is a factor of $2\cdot23$.
Via some combination of the preceding, we get an $s$ and $t$ so that
$$
\frac{s^2+t^2}{s+t}\in\{1,2\}
$$
the only solutions to which are $s=t\in\{1,2\}$. Multiplying by the appropriate combination of $23$ and $43$, we get that $x=y$.
