The 3 by 4 arrangement uses less cardboard.
The surface area of the packaging is given by 2(LW+LH+WH) where L=length, W=width, H=height.
For both arrangements of cans H=12cm.
For 3×4, L=4×6=24cm, W=3×6=18cm; for 2×6, L=6×6=36cm, W=2×6=12cm.
To make it easier, we can work in units of 6cm, so, 24cm=4 units, 18cm=3 units, 12cm=2 units:
For 3×4: area=2(4×3+4×2+3×2)=2(12+8+6)=2(26);
for 2×6: area=2(6×2+6×2+2×2)=2(12+12+4)=2(28).
So since 26 square units is less than 28, the 3×4 arrangement has cheaper packaging.