Issue with modelling word problems as cubic equations I am having problems with a specific set of word problems, which are meant to be modeled as cubic equations in order to be solved.

I will give some examples to specify where I can't solve it.

The first one is:
"In a rectangular piece of cardboard with perimeter 20ft, three parallel and equally spaced creases are made. The cardboard is then folded t make a rectangular box with open square ends.

Show that the volume of the box is     $V(x) = x^2(10 - 4x)"$

So, I know that the volume of a box is height times width times length. I sub in $x$ for width and another $x$ for height and have my $x^2$. Here, though, is my problem. The given answer for length, as far as I understand, is $(10-4x)$. I don't see where this comes from. I'll give another example, continued example here:

"In a rectangular piece of cardboard with perimeter 30in, two parallel and equally spaced creases are made. The cardboard is then folded to make a prism with open ends that are equilateral triangles.

Show that the volume of the prism is $V(x) = (\frac{\sqrt3}{2}x^2)(15-3x)$"

I can see the pattern here of the answer taking the format of (area of end shape)(half the perimeter - number of folds) but I don't understand where the half the perimeter comes from. I've always had quite a lot of difficulty translating word problems to mathematical forms and this has thrown me. The questions after this scale up in difficulty reasonably quickly, so any advice or resources where to get good explanations of how to to about translating these kinds of problems would be greatly appreciated.

As to my attempts thus far, I think I'm making a mistake now that the shape isn't open. For instance a problem like "In a sheet of length y and width z, a square of side x is cut out. Find the maximum volume of the open-top box which results" seems reasonably straightforward to me, whereas a problem such as:

"A 10cm by 20cm piece of sheet metal is cut and folded to make a box with a top.

Show that the volume of the box is $V(x) = x(10-x)(10-2x)$"

This is similar to the ones I find difficult above. The way I solved it, possibly incorrectly, was to draw the shape and observe that, where the box folded upwards, it could only have gone a maximum of 10-x, or else the box would not have a closed top to match the bottom. I'm not sure this is correct reasoning as I find it difficult to apply the same structure to the two problems given above, which seem structurally to be similar.

Any help on where to focus my thinking on these types of problems would be greatly appreciated.
There seems to be an error in the 2nd question:
The area of the base of the prism = 1/2 x base x height
Take the base to be x, and since all 3 sides of the base are equal, using Pythagoras' theorem, make the height of the triangle, h
Then    h^2 +〖(1/2 x)〗^2 = x^2
so the height h = sqrt(x^2 - [(1/2)x]^2  which = sqrt(3{x^2}/4)
the length of the prism would have been calculated the same way as given by Andre Nicolas for the 1st question: (30-3x-3x)/2 = 15-3x
So volume = area of base x length of prism
= 1/2 (x)[sqrt({3x^2}/4)(15-3x)
= (sqrt 3)(x^2)(15-3x)/4 rather than divided by 2 as given in the question
There seems to be an error in the 2nd question:
The area of the base of the prism = 1/2 x base x height
Take the base to be x, and since all 3 sides of the base are equal, using Pythagoras' theorem, make the height of the triangle, h
Then    h^2 +〖(1/2 x)〗^2 = x^2
so the height h = sqrt(x^2 - [(1/2)x]^2  which = sqrt(3{x^2}/4)
the length of the prism would have been calculated the same way as given by Andre Nicolas for the 1st question: (30-3x-3x)/2 = 15-3x
So volume = area of base x length of prism
= 1/2 (x)[sqrt({3x^2}/4)(15-3x)
= (sqrt 3)(x^2)(15-3x)/4 rather than divided by 2 as given in the question