The subspace spanned by a single vector is the space of all scalar multiples of that vector. Here that is the space of all vectors a(x+ 1)= ax+ a for a any number.
The "orthogonal complement" of a vector space is the space of vector such that their inner product with any member of that subspace is 0.
Any vector can be written bx^2+ cx+ d, for some numbers x, y, and z while any vector in W is ax+ a.
Taking p(x)= bx^2+ cx+ d, p(-1)= b- c+ d, p(0)= d, and p(1)= b+ c+ d.
Taking q(x)= ax+ a, q(-1)= -a+ a= 0, q(0)= a, and q(1)= a+ a= 2a.
Their inner product, using the definition given here, p(-1)q(-1) + p(0)q(0)+ p(1)q(1) is
(b- c+ d)(0)+ da+ (b+ c+ d)(2a)= (2b+ 2c+ 3d)a= 0. Here, a must be any number- it is not in general 0 so we must have 2b+ 2c+ 3d= 0. We can solve that for d: d= (-2/3)(b+ c).
Of course W={a(x+ 1)} depends on the single number, a, so is 1 dimensional. That means, since the vector space of quadratic polynomials, ax^2+ bx+ c, is 3 dimensional, the orthogonal complement of W is 2 dimensional. In fact, any vector in the orthogonal complement of W can be written bx^2+ cw+ d= bx^2+ cw+ (-2/3)(b+ c)= b(x^2- 2/3)+ c(x- 2/3).
So a basis is {x^2- 2/3, x- 2/3}.
That is NOT the same as (x^2- 2, x- 2).