Show that a transformation is linear if and only if its restriction to subspaces of dimension 2 is linear.

You assume finite dimension, which is not needed. In fact, it is much easier to not even work with a base. You want to show that for any $v,w\in V$, $\alpha,\beta\in \Bbb K$, we have $$T(\alpha v+\beta w)=\alpha T(v)+\beta T(w).$$ It is enough to observe that $v,w$ are in a two-dimensional subspace of $V$ - namely the space spanned by $v$ and $w$ (which may even be just $1$- or $0$-dimensional, but that does not hurt)


A suggestion without a complete proof

You're doing great so far. But you're right that maybe you've got the wrong 2D subspaces. If you look at a vector

$$ v = c_1 b_1 + \ldots + c_n b_n $$ and $c_n \ne 0$ and not all of $c_1 ... c_{n-1}$ are zero, then you might want to consider the subspace spanned by... $$ p = (c_1 b_1 + \ldots c_{n-1}b_{n-1}) $$ and $$ q = c_n b_n $$ Linearity of $T$ on that subspace lets you inductively work on simplifying $T(p)$, and maybe this'll get you somewhere.


You are working too hard. Suppose $T : V \to V$ is a function, and it is linear on each subspace of dimension $2$. Then, by restriction, we know $T$ is also linear on each subspace of dimension less than $2$,

Part 1: Let $t$ be a scalar and $v$ a vector. Then $T(tv) = tT(v)$ holds since $T$ in linear on the subspace spanned by $v$, which has dimension at most $1$.

Part 2: Let $u,v$ be vectors. Then $T(u+v) = T(u)+T(v)$ holds since $T$ is linear on the subspace spanned by $\{u,v\}$, which has dimension at most $2$.

Perhaps (depending on your definition of vector space) we also need a

Part 0: $T(0)=0$ since $T$ is linear on the subspace $\{0\}$, whan has dimension $0$.