I don't understand where you're getting a y from in the first place. If your original piece of cardboard is a square, then it has the same lengths. If you cut off x cm from each corner, that means that the length and width of your box are each going to be 100 - 2x, and the height of the box will be x.
So its volume will be
This is the function you have to maximise.