The formula to find the volume of cylinder is

The radius of cylinder = 2 in
Height of the cylinder = 3 in
Substituting the values of r = 2 & h = 3
We get
Volume of cylinder

The formula to find the volume of cone is

The radius of the cone is given as 3 inches
Substituting in the formula we get

But the volumes are given equal
So

Dividing by 3
on both sides
we get
h = 4
The height of the cone is 4 inches.