Answer:
The speed of sound is through a solid is calculated using
where Y is the young Modulus and d is the density.
And no, the other answer is wrong. Density is only part of the reason why sound is faster through steel than wood, but the reason why sound through steel is faster is because steel has a higher young modulus (Y) value than wood.
Lead has a higher density than steel but is slower for sound to go through because lead has a lower Y value.