Start by creating a rectangular diagram with length labelled 9 and width labeled 15. Now draw in four squares on the corners that are x by x inches (you might want to show them as dotted lines to represent the cuts you are making). Now imagine folding the four rectangular pieces that are sticking out up -- you end up with an open, 3-d box of dimensions (9 - 2x), length, (15 - 2x), width, and x, height. (If you're having trouble picturing it, actually do it with a piece of paper.) So the volume, as a function of x, is given by V = x(9 - 2x)(15 - 2x).
You might at this point want to specify the real-world domain of this function: 0 < x < 4.5. x has to be positive of course, and smaller than 1/2 the smaller dimension otherwise you won't have a box. You might also notice here that since the volume = 0 when x = 0, the volume = 0 when x = 4.5, and the volume is positive for 0 < x < 4.5, this volume function is guaranteed to have a maximum somewhere on this interval. (Formally, the MVT guarantees this, informally our common sense demands that there be a best x that generates a biggest volume.)
To find the ideal x and the maximum volume analytically, we can differentiate V(x) and set it = 0:
V(x) = 4x3 - 48x2 + 135x
V'(x) = 12x2 - 96x + 135 = 0. You can use quadratic formula to get the two real zeros. The smaller will fall inside the domain specified above and is the ideal x. Plug this into V to get the maximum volume that you can enclose with this cardboard.