.
Let d be the distance from the epicenter of the earthquake to the station (in kilometers).
For P-wave, the traveling time is seconds.
For S-wave, the traveling time is seconds.
The difference is
- = 40 seconds.
It is your "time" equation.
To solve it, multiply all terms by 15 = 3*5. You will get
5d - 3d = 15*40
2d = 600
d = 300 kilometers.
ANSWER. The distance from the epicenter of the earthquake to the station is 300 kilometers.
Solved.
-----------------
From my post, lean on how to write, to solve and to use a "time" equation.
To see many other similar solved problems, look into the lessons
- Earthquake waves
- Had a car move faster it would arrive sooner
- How far do you live from school?
in this site.
Also, you have this free of charge online textbook in ALGEBRA-I in this site
ALGEBRA-I - YOUR ONLINE TEXTBOOK.
The referred lessons are the part of this textbook under the section "Word problems", the topic "Travel and Distance problems".
Save the link to this online textbook together with its description
Free of charge online textbook in ALGEBRA-I
https://www.algebra.com/algebra/homework/quadratic/lessons/ALGEBRA-I-YOUR-ONLINE-TEXTBOOK.lesson
to your archive and use it when it is needed.