Fig (a) — the dielectric fills half the plate AREA, across the full gap. Both halves have the same potential difference, so they are in parallel:
Cair=dε0(A/2)=2C,Cdiel=d4ε0(A/2)=2C
Ca=2C+2C=25C
Fig (b) — the dielectric fills half the GAP, over the full area. The same charge sits on both layers, so they are in series:
Cair=d/2ε0A=2C,Cdiel=d/24ε0A=8C
Cb1=2C1+8C1=8C5⇒Cb=58C

The same amount of dielectric gives more capacitance side by side (a) than stacked (b).