I know that two bases $V_1,V_2$ span the same vector space if and only if every vector every vector in $V_1$ can be written as a linear combination of vectors in $V_2$, and the other way around. For example, $ \{(1,0),(0,1)\} $ and $ \{(2,0),(0,3)\} $ are both bases of $\mathbb R^2$ because $(1,0)$ can be written as $\frac{1}{2}\cdot(2,0)$, $(0,3)$ can be written as $3\cdot(0,1)$ etc.
In my book, the basis $ \{ 1,(x-5)^2,(x-5)^3 \} $ is used as a basis of the subspace $U$ of $\mathcal P_3(\mathbb R)$ defined by $ U = \{ p \in P_3(\mathbb R): p'(5) = 0 \} $. Now, I'd like to know if the following is a correct basis too: $ \{ 1,(x-6)^2,(x-6)^3 \}$.
I know we can, for example, write $(x-6)^2$ as a linear combination of $(x-5)^2$: \begin{array}{rrl} & (x-6)^2 &= u \cdot 1 + v \cdot (x-5)^2 + w \cdot (x-5)^3 \\ \iff& x^2 - 12x + 36 &= u + x^2 - 10x + 25 \text{ (if we take } v=1,w=0) \\ \iff& u &= -2x+11 \end{array} I'm wondering if this is mathematically correct (using variables as the scalars for the linear combination) or if I simply don't understand the polynomial vector space well enough. In the latter case, please help me understand it.
By definition, let $V$ be a vector space over field $K,$ and $e_1,\cdots,e_n,v\in v,$ then $v$ is said to be a linear combination of $e_1,\cdots,e_n$ iff $$\exists \ \lambda_1,\cdots,\lambda_n\in K,\ s.t. \ \sum_{i=1}^k \lambda_ie_i=v.$$ In your case, if you want to show that $(x-6)^2$ is the linear combination of $1,(x-5)^2,(x-5)^3,$ them you have to find $u,v,w\in \mathbb R,$ such that $(x-6)^2=u\cdot 1+v\cdot (x-5)^2+w\cdot (x-5)^3.$
However, under the assumption of the existence of such $u,v,w\in \mathbb R,$ you have obtained that $u=-2x+11,$ which is contradiction with $u\in \mathbb R.$ So the previous assumption is incorrect.