there exsit postive integer $x,y$ such $p\mid(x^2+y^2+n)$ For any give the postive integer $n$,and for any give prime number $p$.
show that
there exsit  postive integer $x,y$ such
$$p\mid(x^2+y^2+n)$$
My approach is the following:
Assmue that $n=1,p=2$,we choose$(x,y)=(1,2)$
$$2\mid6=1^2+2^2+1$$
Assmue that $n=1,p=3$, we choose $(x,y)=(1,2)$
$$3\mid6=1^2+2^2+1$$
Assume that $n=1,p=5$,we choose $(x,y)=(2,5)$
$$5\mid30=2^2+5^2+1$$
Assume that $n=2,p=2$, we choose $(x,y)=(2,2)$
$$2\mid10=2^2+2^2+2$$
Assume that $n=2,p=3$ we choose $(x,y)=(2,3)$
$$3\mid15=2^2+3^2+2$$
Assume that $n=2,p=5$,we choose $(x,y)=(3,3)$
$$5\mid20=3^2+3^2+2$$
and so on 
Now I'm stuck and don't know how to proceed

The result is easy to prove if $p=2$, so we can assume from now on that $p$ is odd.
Modulo $p$, there are $\frac{p+1}{2}$ squares, namely the $\frac{p-1}{2}$ quadratic residues of $p$, and $0$.
So modulo $p$ there are $\frac{p+1}{2}$ distinct values of $x^2$. There are also (for fixed $n$) $\frac{p+1}{2}$ distinct values of $-y^2-n$, since there are $\frac{p+1}{2}$ distinct values of $y^2$, and hence of $-y^2$.
Since $\frac{p+1}{2}+\frac{p+1}{2}=p+1\gt p$, by the Pigeonhole Principle there exist $x$ and $y$ such that $x^2\equiv -y^2-n\pmod{p}$. This implies that there are values of $x$ and $y$ such that $x^2-(-y^2-n)\equiv 0\pmod{p}$.
