Edit distance (Levenshtein-Distance) algorithm explanation
You got the recursive definition wrong. It's

$\qquad\displaystyle d_{ij} = 
  \min \begin{cases} 
         d_{i-1, j}  + c_\mathrm{del}(b_{i}) \\ 
         d_{i,j-1}   + c_\mathrm{ins}(a_{j}) \\ 
         d_{i-1,j-1} + [a_j \neq b_i] \cdot c_\mathrm{sub}(a_{j}, b_{i}) \end{cases}$

where the $c_{\mathrm{op}}$ are fixed costs for the respective operations, all of which are $1$ here. You'll note that for alternatives one and two, insertion and deletion (which correspond to a vertical resp. horizontal step in the matrix), don't care if the current symbol matches any other -- you introduce a gap symbol, anyway!

Following this definition, clearly $2+1$ (insertion of $o$) results in the entry you highlight. Note that the alignment computed (implicitly) up until this point is

$\qquad\begin{array}{cccc}
  - &amp; o &amp; - &amp; - \\
  s &amp; o &amp; l &amp; o
\end{array}$