A round cake pan is basically a cylinder. So, its volume will be pi x r2 x h, where r = radius, and h = height
in the first case, the pan is 6" in diameter, therefore the radius is 3"
Volume = 3.1415 x 32 x 2 = 3.1415 x 9 x 2 = 56.5in3
in the second case, the pan is 8" in diameter, so the radius is 4"
in both cases, the volume will be the same, so 56.5in3 = 3.1415 x 42 x h
we get 56.5in3 = 3.1415 x 16in2 x h
so, h = 56.5in3 / 50.3in2
h = 1.12in