Consider the vector space $V=C[-1,1]$ and $W=P^2[-1,1]$. $V$ is an inner product space withe inner product $\langle f, g\rangle=\int_{-1}^1f(x)g(x)dx$. Consider a function $f(x)=x^4$ whcih is in $V$ but not in $W$. Find its projection $f^*$ onto $W$.
These are what I have so far:
Basis of $P^2(-1,1)=\{1,x,1-3x^2\}$, $f(x)-f^*(x)$ is orthogonal to the basis, so $\langle 1, f(x)-f^*(x)\rangle=\langle x, f(x)-f^*(x)\rangle=\langle 1-x^2, f(x)-f^*(x)\rangle=0$, I got \begin{align*} \langle 1,f(x)-f^*(x)\rangle & =\int_{-1}^{1}1\cdot[x^4-(a+bx+cx^2)]\,dx=0\\ \langle x,f(x)-f^*(x)\rangle & =\int_{-1}^{1}x\cdot[x^4-(a+bx+cx^2)]\,dx=0\\ \langle 1-3x^2,f(x)-f^*(x)\rangle & =\int_{-1}^{1}(1-3x^2)\cdot[x^4-(a+bx+cx^2)]\,dx=0 \end{align*} By solving the system above, we receive $f^*(x)=-3/35+6/7x^2$.
I am not sure this is right or not. Can someone check this solution?

First of all, let me say that your approach works.
That said, you can save some effort when you take an orthogonal basis, because the coefficient of $p_k$ in the projection of $f$ is $\frac{\langle f,p_k \rangle}{\langle p_k,p_k \rangle}$ provided $p_k$ are orthogonal to each other. Thus with $f=x^4$ and the basis you chose you have the coefficients:
1: $\frac{\int_{-1}^1 x^4 dx}{\int_{-1}^1 1 dx} = \frac{1}{5}$.
x: $\frac{\int_{-1}^1 x^5 dx}{\int_{-1}^1 x^2 dx} = 0$.
$1-3x^2$: $\frac{\int_{-1}^1 x^4-3x^6 dx}{\int_{-1}^1 (1-3x^2)^2 dx} = \dots$ (you can do the integration)