When do blowups ''commute''? Let $M$ be a manifold (variety, scheme, your favorite object) and let $N_1,N_2$ be two submanifolds (subvarieties, closed subschemes, ideal sheafes, etc.) such that $N_1 \cap N_2 \neq \emptyset$. Denote by $\text{BL}_{N_i}M$ the blowup of $M$ along $N_i, i=1,2$ and let $\text{BL}_{N_1}\text{BL}_{N_2}M$ be the blowup of $\text{BL}_{N_1}M$  along the proper transform $N_2^\prime$ of $N_2$. (Define $\text{BL}_{N_2}\text{BL}_{N_1}M$ vice versa). 

Question: Under which conditions does the following hold: $\text{BL}_{N_1}\text{BL}_{N_2}M \cong \text{BL}_{N_2}\text{BL}_{N_2}M$ ?

This should be true if we are in the situation $N_1 \subseteq N_2 \subseteq M$, since ``blowups commute with restriction'' but is it in genreal true? If so, is there some reference available? If not, is there a criterium when blow ups commute (e.g. something like transversal intersection or) or/and can you come up with an easy counterexample?
 A: This generally fails even under nice circumstances.
Let $M$ be a smooth projective variety over $\mathbb C$ of (say) dimension $3$ such that it does not contain a rational curve. For instance an abelian threefold. Let $N_1$ and $N_2$ be two smooth projective curves in $M$ intersecting in (at least) a point and for simplicity assume that the intersection is transversal in exactly one point. Finally, let $B=BL_{N_1}BL_{N_2}M$ and $B'=BL_{N_2}BL_{N_1}M$. 
The preimage of $N_1$ in $B$, $E_1$ is a $\mathbb P^1$-bundle (ruled surface) over $N_1$ and the preimage of $N_2$, $E_2$ is a $\mathbb P^1$-bundle over $N_2$ blown-up at a point. Similarly the preimage of $N_2$ in $B'$, $E_2'$ is a $\mathbb P^1$-bundle  over $N_2$ and the preimage of $N_1$, $E_1'$ is a $\mathbb P^1$-bundle over $N_1$ blown-up at a point. 
If $B\simeq B'$, then $E_1\simeq E_2'$ and $E_2\simeq E_1'$, but this cannot happen if $N_1\not\simeq N_2$.

Actually, in the case you claim the two operations commute, you've got a problem:
If $N_1\subseteq N_2$, then what is the proper transform of $N_1$ on ${BL}_{N_2}$?
A: Sándor is exactly right, this generally isn't true.  However, there is a related statement that is always true, instead of blowing up strict transforms of $N_1$ and $N_2$, you should blow up total transforms.

Blowing up total transforms
Suppose that $I_1$ and $I_2$ are the ideals defining $N_1$ and $N_2$ in $M$.  Let $$Y_1 = Bl_{I_1} M = Bl_{N_1} M.$$
Now define the total transform of $I_2$, denoted $\overline{I_{2}}$, to be the ideal formed by extending $I_2$ to $Y_1$, in other words $\overline{I_2} = I_2 \cdot O_{Y_1}$ (note that by the universal property of blowing up $I_1 \cdot O_{Y_1}$ is an invertible sheaf).
$\overline{I_2}$ need not define a manifold, or even a reduced scheme, but we can still blow it up.  Set $$Y_{1,2} = Bl_{\overline{I_2}} Y_1.$$
I claim:  
Theorem: We have $Y_{1,2} = Y_{2,1}$ where the second object is obtained in the same way but blowing up $I_2$ first.
There are at least two ways to see this.  


*

*You can do this from the universal property of blowing up.

*Since you already assumed that $M$ is a manifold, it is integral.  Thus the charts of a blowup can be computed as follows.  Suppose $M = \text{Spec } A$ is affine for simplicity.  If $\langle x_1, \dots, x_n\rangle$ generate an ideal $I$, then as $i = 1,...,n$ varies, $Y_{I,i} = \text{Spec } A[x_1/x_i, \dots, x_i/x_i, \dots, x_n/x_i]$ are affine charts covering the blowup.  $Y_I = Bl_I Y$.


EDIT: As Dustin Cartwright points out in a comment below, blowing up $I_1$ followed by blowing up $\overline{I_2}$ is the same as blowing up $I_1 \cdot I_2$.  

A normal crossings example
I'd like to give you an example in $\mathbb{A}^4 = \text{Spec } k[x,y,u,v]$ showing the difference between blowing up strict transforms and total transforms, even when the $N_i$ intersect transversally (are in normal crossings).  Let $N_1 = V(x,y)$ be a plane and let $N_2 = V(y,u,v)$ be a line.  
Suppose we blowup the line $N_2$ first, then the strict transform and the total transform of $N_1$ coincide.  In particular, $Y_{2,1}$ is the object you were considering.  
On the other hand, let's blow up $N_1$ first, in this case the strict transform $\widetilde{N_2}$ of $N_2$ is a line, but the total transform $\overline{N_2}$ of $N_2$ is two lines.  $\overline{N_2}$ contains the strict transform but also one of the new $\mathbb{P}^1$'s lying over the origin of $N_1 \subseteq \mathbb{A}^4$.  The blowups of the strict and total transform of $N_2$ on $Y_1$ are thus manifestly different.  
One can check that $Y_{1,2} = Y_{2,1}$ if you did the total transform blowup, and so blowing up the strict transforms does not commute.
Note: If I recall correctly, you can also do the example when two planes are kissing.  $N_1 = V(x,y)$, $N_2 = V(u,v)$.  The same sort of thing happens, but it's even messier.  I've seen this example in various papers on resolution of singularities.

In the literature
The difference between strict and total transforms plays a key role in modern resolution of singularities algorithms.  Even though conceptually strict transforms are much easier to think about, they are much harder to compute or control.  Thus modern algorithms tend to use total transforms instead in SOME places, and then peel off any copies of the exceptional you can, while possibly leaving embedded components.  
See for example: 


*

*Section 7 of This paper by Bravo-Encinas-Villamayor

*Example 2.3 of This paper by Howard Thompson
