mathwonk said:
recall that if there is a surjective linear transformation T from V to W, then the dimension of V equals the sum of the dimension of W plus the dimension of the kernel of T. In your case there is a nice surjective linear transformation from your space V to the 2 dimensional space of functions spanned by x and x^2 on [0,1], namely restriction to [0,1]. So what is the kernel? It should be pretty clear that kernel is 3 dimensional, and hence V is 5 dimensional.
Then to get a basis of V, take a basis of the kernel, and add in any pair of functions in V that restrict respectively to x and x^2 on [0,1]. (There is an obvious choice.)
Apologies if I have missed this hint in earlier discussions. This is of course inspired by what is said earlier.
As w have to maintain continuity at 1, we can write our ##f## as
$$
f(x)=
\begin{cases}
ax^2 + bx & x \in [0,1] \\
A(x^3 -1) + B(x^2 -1) + C(x-1) + a+b & x \in[1,2] \\
\end{cases}$$
(credit:
@Steve4Physics)
Let ##T## be the operator which restricts the function to ##[0,1]##, therefore, ##T : V \to W##, where ##V## is the space given in the question, and ##W## is all polynomials with degree less than or equal to 2 and ##p(0)=0##.
##T(f) = ax^2 +bx##
The following function will always yield ##0##
$$
f(x) =
\begin{cases}
0 & x \in [0,1] \\
A(x^3-1) + B(x^2 -1) +C(x-1) & x \in[1,2]\\
\end{cases}
$$
(the continuity is maintained).
So, the null space is the space of all those functions. Its basis is
##
f_1 =
\begin{cases}
0 & x \in[0,1]\\
x^3-1 & x \in [1,2] \\
\end{cases}
##
##
f_2 =
\begin{cases}
0 & x \in[0,1] \\
x^2 -1 & x \in [1,2] \\
\end{cases}
##
##
f_3 =
\begin{cases}
0 & x \in[0,1]\\
x-1 & x \in [1,2]\\
\end{cases}##
The basis for range of ##T## is ##\{x^2, x\}##.
##dim V = 3 + 2 =5##
Basis for ##V## is ##\{f_1, f_2, f_3, f_4, f_5\}##
$$
f_4 =
\begin{cases}
x^2 & x \in [0,1] \\
1 & x \in [1,2]\\
\end{cases}
$$
$$
f_5 =
\begin{cases}
x & x \in[0,1] \\
1 & x \in[1,2]\\
\end{cases}
$$
Your hint was really unique.