your volume formula is not correct.
anyway volume = 1/3 * h * r^2*pi, this liquid volume is constant regardless of the container.
so plug in h and r, v = 1/3 * 6 * 3^2 *pi= 18pi
cylinder is just area of circle * h, so
pi*r^2*h = 18 pi
r^2*h= 18
3*3*h=18
h = 2
basically set the volume equal to each other, and plug in r, and solve for H in cylinder eqn