24 edges
1) Examining that shape let's do it by parts since the pyramid is on top of that prism.
2) The edges of a Hexagonal pyramid have 12 edges but note that in this shape we have two combined figures, as well as a Hexagonal Prism, has 18 edges.
So we can write down the following:
Note that we mark in blue the ones already counted. So we can write out the following:
So that shape has 12 edges + (18 -6 (common edges) = 12 +12 = 24 edges
And that is the answer.