Separate all 6 faces of cube, it will become 6 squares now.
each square having 4 sides. so adding all 6 squares makes 6×4=24 sides
Now imagine the formation of cube with 6 squares, you will find that 2 sides attached to make an edge of cube.
total number of sides= 24
so the number of edge =24/2 =12
each edge length is l , so 12 edge length will be 12l