They are close but not the same.
I think the equation you are looking for is:
Mass = Volume x Density
Density = Mass/Volume
Mass = Density x Volume
Volume = Mass/Density
Tungsten and gold have very similar density and are hard to distinguish based on density, which was Archimedes’s non-destructive test, to determine if the king’s crown was pure gold, or only plated. (It was plated, the goldsmith was executed.) Archimedes determined the volume of the crown by measuring the amount of water it displaced when immersed completely in water. Then find an amount of gold that displaced the same volume when immersed. Place the known amount of gold on one side of a balance scale, the crown on the other. The goldsmith’s life hangs in the balance. If they weigh the same amount, the goldsmith is honest. If not, he is found wanting.
The speed of sound depends on both density and Young’s modulus (”elasticity”), the coefficient in Hook’s law for a particular material. The more easily a material is stretched, the slower sound propagates, the denser the material, likewise, the more slowly sound propagates. The speed of sound is the square root of the ratio of Young’s modulus to density. The spectral response of a sample (a guitar string, for instance) depends on density and elasticity of the sample. Just a guess on my part, but I would expect that it should be easy to distinguish a gold bar form tungsten.
BTW, tungsten bars are used to balance (trim) certain aircraft, to account for changes in the center of mass with varying loads. They are bolted near the nose of the A/C.