Meaning of equality in the vector spaces Let $v_1$ and $v_2$ be two vectors of the vector space $V$. Is there any need for defining $v_1 = v_2$? If we look at the axioms for the vector space there is no explicit definition. I was solving this problem, then that question came to mind:

Determine whether $p_1 = 1 + x + 4x^2$ and $p_2 = 1 + 5x + x^2$ lie in $span\{ 1+2x-x^2 , 3+5x+2x^2\}$.

For $p_1$, we want to determine if $s$ and $t$ exist such that $1 + x + 4x^2 = s(1+2x−x^2)+t(3+5x+2x^2) $. The answer depends on the meaning of equality. If it should be true for all real numbers then we can equate coefficients and obtain $s = -2 , t=1$.  
 A: To determine that two vectors are equal depends of the kind of vector you are working with. For example, in $\textsf{F}^n$, the set of all $ n $-tuples with entries in the field $F$, two vectors $(x_1,x_2,\dots,x_n)$ and $(y_1,y_2,\dots,y_n)$ are equal if and only if $x_j=y_j$ for all $j=1,2,\dots,n$. Similarly, in the space of polynomials $F[x]$, two polynomials 
$$a_0+a_1x+\cdots+a_nx^n$$ and $$b_0+b_1x+\cdots+b_mx^m$$
are equal if and only if $m=n$ and $a_j=b_j$ for all $j$. 
Another one, in the space of all functions that go from a non-empty set $ S $ to the field $ F $, two functions $f$ and $g$ are called equal if and only if $f(s)=g(s)$ for all $s\in S$.
As you can see, everything depends on the vector space in question and not on the properties that define a vector space.
Now, for your other question, the set
$$\textsf W = \operatorname{span}(\{ 1+2x-x^2,3+5x+2x^2 \})$$ 
consists of all possible linear combinations of the vectors $1+2x-x^2$ and $3+5x+2x^2$. So, $p_1(x)=1+x+4x^2$ lies in $\textsf W$ if there are scalars $s$ and $t$ such that
$$\begin{align} 
1+x+4x^2 &= s(1+2x-x^2)+t(3+5x+2x^2) \\
&= (s+3t) + (2s+5t)x + (-s+2t)x^2
\end{align}$$
but as I mentioned above, this happens if and only if
$$\left\{ \begin{align}
s+3t &=1 \\ 2s+5t &=1 \\ -s+2t &=4 
\end{align} \right.$$
Now, if this system of equations has a solution, that means that $ p_1 (x) $ can be written as a linear combination of $1+2x-x^2$ and $3+5x+2x^2$ and then $p_1(x)\in \textsf W$.
A: You're confusing equality and free families. If a family is free, then a linear combination of elements of the family is zero if and only if all the coefficients are zero. In the same vein, two vector which are linear combination of the elements of a free family are equal if and only if they have the same coefficients.
Take note that one side is always true, two vector are equals if they have the same coefficients in the linear combination. In your case, the family ${1+2x−x^2,3+5x+2x^2}$ is free so your reasoning is valid, for the equality to be true, the coefficients need to be equal.
Edit : Answer to your comment : Let V be a vector space over a field K and $x_1, x_2, ..., x_n \in V$ a family of vectors. This family is free if :
$$\forall \lambda_1, \lambda_2,..., \lambda_n \in K, \sum_{i=1}^n \lambda_ix_i = 0 \implies \lambda_1 = \lambda_2 = ...=\lambda_n$$
An infinite family is free if all its finite subfamily are free. Two elements in the span of a free family are equal if and only if they have the same coefficients in the linear combination of the elements of the free family.
In particular, in your case, in the space of polynomials functions from $\mathbb R$ to $\mathbb R$, the family $1, x, x², ...$ is free so 2 functions are equal if and only if they have the same coefficients.
A: Equality of polynomials means they are equal for every $x$.
So, for example, if $ax^2 + bx = cx^2 - d$ then $a=c$ and $b=d=0$.
I think the best thing to do for vector spaces of polynomials (of degree $d$) is to forget the polynomials altogether and only think of the coefficients.
This way $1+2x-x^2$ is simply $(-1,2,1)$
