Extension of a linear transformation and Zorn's lemma 
Let $V,W$ be vector spaces over some field $\mathbb{F}$ and $B$ a subspace of $V$ and $T:B \longrightarrow W$ a linear transformation.Then $T$ can be extended to a linear transformation $L$ on $V$,i.e there is a linear transformation $L:V \longrightarrow W$ such that $L|_B=T$.

This is an exercise from Derek Goldray's book, Classical set theory.
I would like to show my attempt to prove this:
$Proof:$
Let $A$ be the family of pairs $(S,L)$ where $S \supseteq B$ and $S$ is a linear subspace of $V$ and $L:S \longrightarrow W$ a linear transformation such that $L|_B=T$
We now partially order $A$ in this way: $(S_1,L_1) \leqslant (S_2,L_2) \Longleftrightarrow S_1 \subseteq S_2$ and $L_2|_{S_1}=L_1$
We have that $A \neq \emptyset$ because $(B,T) \in A$.
Let $C=\{(S_i,L_i)|i \in I\}$ be a chain in $A$ and let $(M,F)$ be the pair where $M=\bigcup_{i \in I}S_i$ and $F:M \longrightarrow W$ such that $F(x)=L_i(x),x \in S_i$.
We can easily see that $M$ is a linear subspace of $V$ using the fact that any two elements in a chain are comparable.
Also let $x,y \in M$. So $x \in S_i$ and $y \in S_j$ for some $i,j \in I$.But $S_i \subseteq S_j$ or $S_j \subseteq S_i$.
Assume that $S_j \subseteq S_i$. We know that $S_i$ is a subspace of $V$ thus $x,y \in S_i \Longrightarrow x+y \in S_i$ and $F(x+y)=L_i(x+y)=L_i(x)+L_i(y)=F(x)+F(y)$.
In the same way we can prove that $F(ax)=aF(x),\forall x \in M,\forall a \in \mathbb{F}$. Thus $F$ is a linear transformation and an extension of $T$.
Clearly $(M,F)$ is an upperbound of $C$ because $\forall (S_i,L_i) \in C$ we have that $S_i \subseteq M$ and $F|_{S_i}=L_i \Longrightarrow (S_i,L_i) \leqslant (M,F), \forall i \in I$ and $(M,F)\in C$ ,thus form Zorn's lemma exists a maximal element $(S_0,L_0) \in A$
Now we need to show that $S_0=V$.
Let $S_0 \subsetneq V$ and $z \in V$ \ $S_0$.
Let $Y=<S_0,z>=\{s+az|s \in S_0,a \in \mathbb{F}\}$.Clearly $S_0 \subsetneq Y$ and $Y$ is a proper  subspace of $V$.
Let $L_1: Y \longrightarrow W$ such that $L_1(s+az)=L_0(s)+av$ for some $v \in W$
$L_1$ is a linear transformation.
$$L_1(s)=L_1(s+0z)=L_0(s)$$ $$L_1(z)=L_1(\bar{0}+1z)=L_0(\bar{0})+v=\bar{0}+v=v$$
We have that $L_1(S_0)=L_0(S_0)$ \Longrightarrow $(S_0,L_0)<(Y,L_1)$
This is a contradiction because of the maximality of $(S_0,L_0)$ thus $$S_0=V$$
Is my attempt correct?
Thnak you in advance!
 A: I think there is a problem, but is easy to fix. You can't define $L_1 : Y \rightarrow W$ as $ L_1(s + az) = L_0 (s) + a z$ because you don't know if $z$ $\in$ $W$ ($W$ and $V$ may be diferent vector spaces) an easy way to solve this is defining $ L_1(s + az) = L_0 (s) + a v$, for some $v$ $\in$ $W$.
A: You have essentially proved Baer's Criterion for fields.
A different strategy is to prove $B$ has a complement and you might think to the similarities in the two approaches.

Consider the family $\mathcal{A}$ of all subspaces $C$ of $V$ such that $C\cap B=\{0\}$, ordered by inclusion.
The union of a chain in $\mathcal{A}$ is again a member of $\mathcal{A}$ (prove it). By Zorn's lemma, $\mathcal{A}$ has a maximal element $M$.
Suppose $B+M\ne V$ and let $v\in V$, $v\notin B+M$. Let's prove that $(M+\langle v\rangle)\cap B=\{0\}$. Suppose $a\in\mathbb{F}$, $x\in M$, and $y\in B$ with $av+x=y$, so $av=y-x\in B+M$.
If $a\ne0$, then $v=a^{-1}(y-x)\in B+M$, a contradiction. So $a=0$, hence $x=y$, so $x=y=0$.
This contradicts the maximality of $M$. Therefore $B+M=V$ and we can define $L$ to be $T$ on $B$ and $0$ on $M$.
