Prove that $\sum_{y=0}^{p-1}\left(\frac{y}{p}\right)\left(\frac{y+d}{p}\right)=-1$ The question is from The number of solutions of $ax^2+by^2\equiv 1\pmod{p}$ is $ p-\left(\frac{-ab}{p}\right)$
And I wonder how to prove the following equation although someone gives the trick:
\begin{split}
\sum_{y=0}^{p-1}\left(\frac{y}{p}\right)\left(\frac{y+d}{p}\right)=-1
\end{split}
Here is the trick:using$\left(\frac{y^*}{p}\right)$ instead of$\left(\frac{y}{p}\right)$
$y^*$  is the inverse of $y$ modulo $p$
 A: Here is my answer:
We can replace $\left(\frac{y}{p}\right)$ with $\left(\frac{y^*}{p}\right)$ such that:
\begin{split}
\left(\frac{y}{p}\right) = \left(\frac{y^*}{p}\right).
\end{split}
We can easily verify it by using primitive root.
When $y = 0$ there is no inverse, so we ignore the first term of  $\sum_{y=0}^{p-1}\left(\frac{y}{p}\right)\left(\frac{y+d}{p}\right)$.
So we have:
\begin{split}
&\sum_{y^*=1}^{p-1}\left(\frac{y^*}{p}\right)\left(\frac{y+d}{p}\right)\\
&=\sum_{y^*=1}^{p-1}\left(\frac{1+y^*d}{p}\right)\\
&=\sum_{y=1}^{p-1}\left(\frac{1+yd}{p}\right).
\end{split}
Because we know that:
\begin{split}
\sum_{y=0}^{p-1}\left(\frac{1+yd}{p}\right) = 0
\end{split}
Legendre symbol: Showing that $\sum_{m=0}^{p-1} \left(\frac{am+b}{p}\right)=0$
So it lacks the first term, that is $\left(\frac{1}{p}\right) = 1$, and we can get:
\begin{split}
&\sum_{y=0}^{p-1}\left(\frac{y}{p}\right)\left(\frac{y+d}{p}\right)\\
&=\sum_{y=1}^{p-1}\left(\frac{y}{p}\right)\left(\frac{y+d}{p}\right)\\
&=-1.
\end{split}
There is a better way I think:
\begin{split}
\left(\frac{y(y+d)}{p}\right)=\left(\frac{y(y+dyy^\ast)}{p}\right)=\left(\frac{y^2(1+dy^\ast)}{p}\right)=\left(\frac{1+dy^\ast}{p}\right)
\end{split}
from$\left( \frac{1 \cdot 2}{p} \right) + \left( \frac{2 \cdot 3}{p} \right) + \cdots + \left( \frac{(p-2)(p-1)}{p} \right) = -1$
