Volume of a cone: V = pi(r^2)h/3 to solve for height (h), divide pi and r^2 from both sides canceling it out in the right making v/pi(r^)=h/3 then multiply 3 by both sides to cancel the 3 on the right leaving
h= (3) V/pi(r^2)
since it is known the diameter is 3 inches, the radius is 1.5 because the radius is half the diameter
the volume is also known to be 12 cubic inches so plug in what you know
H= (3) 12/pi(1.5^2)
to get the height to be approximately 5.093in