Since it is a right octagonal prism then we can get the idea that it's having 90degrees to the vertical but since it is truncated 45degrees from the horizaontal then we can get the idea that the volume of the truncated octagonal prism is half of the volume of the octagonal right prism..
We have the general formula in finding the volume as
[tex]V = BH[/tex]
where V is the volume, B is the area of the base and H is the altitude or the height
since we know that the volume of the truncated prism is half of the regular one then we'll have the volume as:
[tex]V = \frac{1}{2} BH[/tex]
The area for a regular octagon is defined by the formula:
[tex]A = 2(1 + \sqrt{2}) s^{2} [/tex]
where s is the length of one side.
Since you're given that the length of one side is 5cm then you can get the area
substituting it to the formula for volume you'll have:
[tex]V = \frac{1}{2} (2(1+ \sqrt{2})5^2 H [/tex]
[tex]V = 60.355 H[/tex]
so that would be the volume in terms of H since you are not given the value of H.