I may have misunderstood but:
f[a_, b_, n_] := Module[{lg = Length[a[[1]]], m1, m2, m3},
m1 = UpperTriangularize[
ConstantArray[w[b], {n + lg - 1, n + lg - 1}], lg];
m2 = LowerTriangularize[
ConstantArray[w[Transpose[b]], {n + lg - 1, n + lg - 1}], -lg];
m3 = DiagonalMatrix[ConstantArray[w[a], n]];
Plus @@ (ArrayFlatten /@ ({m1, m2, m3} /. {w -> Sequence}))
]
Example,
f[{{1, 2}, {3, 4}}, {{5, 6}, {7, 8}}, 5] // MatrixForm
yields:

Just to emphasize the block structure (apologies too lazy to change colour of transposes):
Grid[f[{{1, 2}, {3, 4}}, {{5, 6}, {7, 8}}, 5],
Dividers -> {{{True, False}}, {{True, False}}},
Background -> {Purple, None,
Thread[Table[{i, i}, {i, 10}]~Join~Table[{i, i + 1}, {i, 1, 9, 2}]~
Join~Table[{i, i - 1}, {i, 2, 10, 2}] -> Red]},
BaseStyle -> {White, Bold}]

Or 3x3 example:
t1 = {{6, 6, 1}, {0, 3, 7}, {8, 6, 0}}
t2 = {{1, 1, 7}, {2, 4, 5}, {1, 5, 8}}
diag = Thread[
Join @@ NestList[Map[Function[x, x + {3, 3}], #] &,
Tuples[Range[3], 2], 4] -> Red];
Grid[f[t1, t2, 5],
Dividers -> {{{True, False, False}}, {{True, False, False}}},
Background -> {Purple, None, diag}, BaseStyle -> {White, Bold}]

Generalizing the visualization:
vis[m_, b_] := Module[{lgt = Length[m[[1]]], dg},
dg = Thread[
Join @@ NestList[Map[Function[x, x + {b, b}], #] &,
Tuples[Range[b], 2], lgt /b - 1] -> Red];
Grid[m,
Dividers -> {{Prepend[Table[False, {b - 1}], True]}, {Prepend[
Table[False, {b - 1}], True]}},
Background -> {Purple, None, dg}, BaseStyle -> {White, Bold}]
]
gf[a_, b_, n_] := vis[f[a, b, n], Length[a[[1]]]]
