Explain to me how you got [2,6] because it's not obvious to me. Your tag says "matches" and to find B in A, you can do this:
[rowsA, colsA] = size(A);
[rowsB, colsB] = size(B);
for col = 1 : (colsA - colsB + 1)
subA = A(:, col : col + colsB - 1)
but you can see your B never appears anywhere in your A. Are you perhaps just looking at the top row of each? But even that will not work because [2,1] occurs only at column 7-8.