I'm reading Hartshorne Chapter 5 (1.3). He uses the following fact:
Assume $C,D$ are effective divisors over a projective smooth surface $X$. Then there is a short exact sequence: $$0\rightarrow\mathcal L(-D)\otimes\mathcal O_C\rightarrow\mathcal O_C\rightarrow\mathcal O_{C\cap D}\rightarrow 0$$
I'm trying to prove it and here is my attempt:
First, I try to make the statement more precise. Let $i:C\rightarrow X$ and $j:D\rightarrow X$ and $l:C\cap D\rightarrow C$ be closed immersions. Then it actually states $0\rightarrow i^*\mathcal L(-D)\rightarrow\mathcal O_C\rightarrow l_*\mathcal O_{C\cap D}\rightarrow 0$.
Now pullback the short exact sequence $0\rightarrow \mathcal L(-D)\rightarrow \mathcal O_X\rightarrow j_*\mathcal O_D\rightarrow 0$. We obtain: $$i^*\mathcal L(-D)\rightarrow\mathcal O_C\rightarrow i^*j_*\mathcal O_D\rightarrow 0$$
Here I meet 2 questions:
How to show it is exact at left?
How to show $i^*j_*\mathcal O_D = \mathcal l_*O_{C\cap D}$? (I try to draw the Cartesian diagram of $C\cap D$ and do pullback and pushforward. But I fail to work it out)
Thank you in advance!