Here I am given the following.
Define an inner product in $\mathcal{P}_2$ by: $$\left<p,q\right>=p(-1)q(-1)+p(0)q(0)+p(1)q(1).$$ a) Starting with the basis $\left\{1,x,x^2\right\}$ of $\mathcal{P}_2$, use the Gram-Schmidt process to find an orthonormal basis for $\mathcal{P}_2$ with respect to this inner product.
I already did this. The orthonormal basis is $\left\{\frac{1}{\sqrt{3}},\frac{1}{\sqrt{2}}(x),\sqrt{\frac{3}{2}}\left(x^2-\frac{2}{3}\right)\right\}$.
b) Find all the polynomials in $\mathcal{P}_2$ that are orthogonal to $x^2-1$.
I'm stuck here. I took the inner product of $ax^2+bx+c$ and $x^2-1$ which gives be that $c=0$ but how can I get what $a$ and $b$ are?
You are done: simply verify that both $x$ and $x^2$ give zero inner product with $x^2-1$, and therefore so do any linear combination of them, that is, $a$ and $b$ can be arbitrary.
Also, the perpendicular of a nonzero vector in a 3d inner product space should be a 2d subspace, i.e. the degree of freedom of variables $a,b,c$ is $2$, which is clearly the case now.