The actual wave solution is incredibly complex, but I think you can get a descent estimate based on the following assumptions.
1) There is only one sharp change in density, and that defines the core. (The crust is not going to make much of a difference for this approach, as it is sufficiently thin.)
2) Geometrical optics approach is sufficient. So we don't have to talk about diffractions of the wave, just refractions at the interfaces.
I'm going to use terms from geometrical optics, so I'll call the path a P-wave took to get from where it originated to where it was detected a "beam".
The problem is cylindrically symmetric, so we can consider a 2D problem only. So picture Earth as two concentric circles with radii R1<R2. R2 is Earth's radius, and R1 is what you are trying to find. Inner circle is the core with some density giving speed of P-wave propagation c1, and the outside of that circle the P-wave propagates at c2. I will denote the center of the two circles as point O.
Consider a beam that leaves point A on the outer circle and hits the core at point B. Call angle OAB θ2 and AOB θ1. Distance from A to B is d. Then:
R_1 sin(\theta_1) = d sin(\theta_2)
R_1 cos(\theta_1) + d cos(\theta_2) = R1 + R2
After entering the core, the beam is refracted and exits the core at point C. Refraction will depend on wave speed propagation. If we call angle of incidence α and angle of refraction β, we can define the following two relations.
\alpha = \theta_1 + \theta_2
\frac{sin(\beta)}{c_1} = \frac{sin(\alpha)}{c_2}
First is purely geometric, second is due to Snell's Law of refraction, which holds for P-waves in this approximation.
After exiting core at C, the beam continues to point D on outer circle, where it is detected. Note that angle OBC is the angle of refraction β, and it is equal to angle OCB. Angle BOC is then 180°-2β. That gives us angle AOD = AOB + BOC + COD = BOC + 2*AOD. And that's the angle from epicenter to the point where the wave was detected. Let me denote it as γ.
\gamma = 180° - 2 (\beta - \theta_1)
So you can find point of exit as function of θ1. Though, not a trivial one. Now you need the time. You already know that the beam will travel distance d, defined by an earlier equation, before it hits the core. It will travel the same distance after leaving the core. What's left is to compute distance within the core. Call that distance b. Again, using triangle BOC for reference, we can see that the following holds.
b = 2 R_1 cos(\beta)
And this finally gives us time.
t = 2 \frac{d}{c_2} + \frac{b}{c_1}
Now you can take your data and fit it to the unknown R1 and θ1 on known γ and t. It's going to be an ugly fit, but presumably you'd have a computer program do it, so there shouldn't be any problems. If you have good data from opposite side of the planet with precise times, you should be able to get a very good estimate for the radius.