Well, you ought to be able to do this using "conservation of energy". If the spring has spring constant k, and you compress it a distance x, it gains potential energy (1/2)kx2. When it is released, that potential energy goes into the kinetic energy of the ball, (1/2)mv2: (1/2)kx2= (1/2)mv2 so the speed with which the ball leaves the spring is [itex]v= x\sqrt{(k/m)}[/itex]. I don't think the ball will lose much speed in "just a few inches". The density of steel varies a little depending on the kind of steel- I'll let you look that up.