Formula for calculating volume of a cone is:
V = B*H/3
Formula for calculating volume of cylinder is:
V2 = B2*H2
because our cone fits exactly inside cylinder that means that their bases are the same and heights are the same. From this we can conclude (observing formulas for each volume) that cone has 3x less volume than our cylinder.
Cylinder volume is 6*3 = 18 in^3