The answer is; The farther away the P and S waves are on a seismogram, the further the epicenter.
P-waves always arrive first to S-waves because they are faster. P-waves are compressional waves, unlike S-waves which are shear waves. The time difference between the arrival of P-waves and S-waves can be used to deduce the epicenter of the quake. The bigger the difference the farther the epicenter. A graph is used to deduce the approximate distance in kilometers.