This is Proposition 25.3(i) from Tu's book on manifolds:
The four-term sequence $0 \rightarrow A \xrightarrow{f} B \rightarrow 0$ of vector spaces is exact if and only if $f: A \rightarrow B$ is an isomorphism.
The proof is left as an exercise. This is my attempt:
$(\Rightarrow)$ Suppose the sequence is exact. Let $g: 0 \rightarrow A$ and $h:B \rightarrow 0$ denote the two maps not labelled in the sequence. If $b \in B$, then $b$ is in the kernel of $h$, and by exactness must also be in the image of $f$. This proves $f$ is surjective.
Now suppose $f(x) = f(y)$ for some $x, y \in A$. Then by linearity, $f(x-y) = 0$. Since $g$ is linear it must map the zero element to the zero element. Since $g$ only consists of the zero element, by exactness, the kernel of $f$ is $\{0\}$. Hence $x = y$. So $f$ is injective.
Since $f$ is linear and bijective, it must be an isomorphism.
($\Leftarrow$) Suppose $f$ is an isomorphism. Define $g$ and $h$ as above. By surjectivity, Im$(f) = B$, and since $h$ is the zero map, we have that Im$(f) = $ Ker$(h)$. By injectivity, Ker$(f) = \{0\}$. Since $g$ is required to be linear, we must have that $g$ is the zero map. Thus Im$(g) =$ Ker$(f)$.
This proves the sequence must be exact.
For the forward direction, is the linearity of $f, g$, and $h$ implied from the definition or must be that be proven as well? Similarly, I assumed that $g$ and $h$ must be linear when proving the converse. Is this assumption ok to make? Is my proof otherwise correct?