You are maximizing volume which is V = xyz.
Picture your box as a T-shape or a cross shape where you discard each of the four rectangles outside the cross shape.
By dividing the box into three parts for each side you get z+x+z=10 and z+y+z=20 or 2z+x = 10 and 2z+y=20 with V=xyz.
This gives you three equations in three variables which you can now solve.
If its still confusing, you might want to draw a diagram and look at how this is obtained.