Earthquakes produce two kinds of seismic waves: he longitudinal primary waves (called P waves) and the transverse secondary waves (called S waves). Both S waves and P waves travel through Earth's crust and mantle, but at different speeds; the P waves are always faster than the S waves, but their exact speeds depend on depth and location. For the purpose of this exercise, we assume the P wave's speed to be 8790 m/s while the S waves travel at a slower speed of 5350 m/s.
If a seismic station detects a P wave and then 58.9 s later detects an S wave, how far away is the earthquake center?