Squares of side length x inches are removed from each corner of a 18-inch by 24-inch rectangular sheet of metal, and the sides are folded up to form an open-top box. For 0<x<9, determine the value of x that yields the maximum volume of the box. Give your answer exactly.