A basis for the polynomials that shows up in physics are the “Legendre polynomials.” The first few, B = {1, x, ((3/2)x^2)-(1/2)}, are a basis for P2. Calculate [3-x+x^2]B.
I understand a basis is the largest set of linear independent vectors, but not sure how it comes to play for this question.
Expanding hint given by dxiv
In general you can express any (even noncontinuous) function by a linear combination of (orthogonal) basis
here $$3-x-x^2=\sum_{n=0}^{2}c_nP_n \tag{1}$$
Where $P_n$ are the Lengendre polynomials Use the orthogonal property of the Lengendre Polynomials given by
$$\int_{-1}^1 P_nP_mdx=\frac{2}{2n+1}\delta_{mn}$$
Where $\delta_{mn}$ is the kronecker delta
Multiply eq(1) by $P_m, \forall m<3$ and integrate
you get
$$\frac{2}{2m+1}c_m=\int_{-1}^{1}(3-x-x^2)P_m\mathrm dx$$
Substitute these $c_m$'s back in eq(1)