If the two cylinders are similar, that means that the ratio between the diameter and the height will be the same in both solids.
In the bottom cylinder, we have a ratio of 3ft to 12ft. This is a ratio of 3:12, or 1:4, where the 1 is the height and 4 is the diameter.
The top cylinder has a height of 8 inches, meaning that the 8 corresponds to the 1 in the ratio. Thus, we can set up the equation like this:

To get from 1 to 8, we have to multiply by 8. But because we don't want to change the ratio, we have to multiply the denominator by 8 as well:

That means the top cylinder has a diameter of 32. But we can't forget our units. Because we used 8 inches in our ratio, that means the diameter is 32 inches.