In order to show $\sum_{0\leq k\leq p-1}\left(\frac{ak^2+bk+c}{p}\right)=\left(\frac{a}{p}\right)$ with $p$ a prime number greater and equal to 3 and $gcd(b^2-4ac,p)=1$, I started to set $d=b^2-4ac$, and $x=2ak+b$, then the equation becomes $\sum_{0\leq x\leq p-1}\left(\frac{x^2-d}{p}\right)=\left(\frac{4a^2}{p}\right).$
Now use the property of Legendre symbol: $\sum_{0\leq x\leq p-1}\left(\frac{x^2-d}{p}\right)=\sum_{0\leq y\leq p-1}(1+\left(\frac{y+d}{p}\right))\left(\frac{y}{p}\right)=\sum_{0\leq y\leq p-1}\left(\frac{y+d}{p}\right)\left(\frac{y}{p}\right)=-1.$
However, for the RHS $\left(\frac{4a^2}{p}\right)$ doesn't seems to be equal -1, or is it? Did I make any mistakes in my proof?