This is the concept of geometry, the length of the lateral edge of the prism will be given by:
Length=[lateral area]/[area of the hexagon]
lateral area=360cm^2
area of hexagon will be:
Area=a^2ntan(180/n)
where;
n=number of sides
a=apothem size
A=5^2*6tan(180/6)
A=86.60
Thus the length will be:
length=360/86.6
=4.2 cm