I would like to get a better understanding of the following situation.
Consider the affine plane $\mathbb{A}^2$ and blow up in a point. Denote the blown up space by $X_1$ and the exceptional divisor by $E_1$. Blow up again in a point on $E_1$, yielding $X_2$ and $E_2$. The strict transform of $E_1$ lives on $X_2$. Denote it again by $E_1$. Next, we contract ("blow down") $E_1$. Denote the new space by $X_3$. The point to which $E_1$ is contracted will be a singularity of $X_3$.
The canonical divisor of $X_2$ is given by $E_1+2\cdot E_2$. Apparently, the canonical divisor of $X_3$ will be given by $2\cdot E_2$ but I don't understand why. Furthermore, I would like to know what the self-intersection number of $E_2$ (or rather, the image of $E_2$ under this contraction map) will be in $X_3$. I know how to compute these things in the smooth case.
Finally, is the contraction of $E_1$ really the inverse of a blow up? Is there a way to know what the intersection number of the exceptional divisor of this blow up should be? In this case this number should equal -2 (and not -1 which would be true if $X_3$ was smooth).
I would be grateful if someone could help me understand this or point me to some place where I can learn this.
In your case notice that $E_1\subset X_2$ has self-intersection number $-2$ and thus $X_3$ has a rational double point, which is Gorenstein. Thus, if $\pi:X_2\to X_3$ denotes the blowing down map, $\pi^*K_{X_3}=K_{X_2}$ and thus you get $K_{X_3}$ to be the image of $2E_2$. Self intersection of $\pi(E_2)$ is slightly problematic, since it is not a Cartier divisor, only $\mathbb{Q}$-Cartier. So, to calculate, $4\pi(E_2)^2=\pi^*(\pi(2E_2))^2=(2E_2+E_1)^2=-4+4-2=-2$.