Cartan's extension theorem as a corollary of Theorem B By Cartan's Theorem B: 

For every coherent analytic sheaf $\cal F$ on a Stein space $(X,\mathcal O_X)$ then $H^p(X,\mathcal F)=0$ for $p=1,2,...$

How can I apply this to the exact sequence $0\rightarrow\mathcal J_A\rightarrow \mathcal O_X\rightarrow\mathcal O_X/\mathcal J_A\rightarrow 0$ where $A$ is a closed complex subvariety of $X$ in order to  show that:

(Cartan's extension theorem:) Every holomorphic function on a closed complex subvariety in a Stein space $X$ extends to a holomorphic function on $X$. 

 A: Even if Ted Shifrin said everything I'll maybe recall how exact sequences work. You have an exact sequences of sheaves $0 \to J_A \to \mathcal O_X \to \mathcal O_A \to 0$ where $\mathcal O_A := \mathcal O_X/J_A$. 
This does not means that for any $U$, the sequence $0 \to J_A(U) \to \mathcal O_X(U) \to \mathcal O_A(U) \to 0$ is exact : that just means that the sequence is exact at all the stalks.
Now $F(U) = \Gamma(F,U) = H^0(F,U)$ (depending of notation) has a long sequence associated : namely we know that $0 \to J_A(X) \to \mathcal O_X(X) \to \mathcal O_A(X) \to  H^1(J_A,X) \to H^1(\mathcal O_X,X) \to \dots $ is exact. But according to Cartan's theorem, $H^1(J_A,X) = 0$ so in particular the map $\mathcal O_X(X) \to \mathcal O_A(X)$ is surjective, which exactly means that any holomorphic function on $A$ extends to an holomorphic function on $X$. 
Remark : 1) Notice that $J_A$ is not really a sheaf on $X$ but this is a notation for $i_*J_A$ which is a sheaf on $X$, where $i : A \to X$ is the inclusion. 
2) The Stein hypothesis is very important here as the function $id : \mathbb C \to \mathbb C$ does not extends holomorphically to $\mathbb P^1 \supset \mathbb C$. 
