Well, huh, I assume we are talking about distance directly to home plate and not back along the path he is running.
Between home plate and first base (when d ≤ 90), or 3rd and home (270 ≤ d ≤ 360), the function is d(t) = 18t.
Between 1st and 2nd and between 2nd and 3rd, you have a right triangle with the distance between the runner and home plate being the hypotenuse and either the 1st or 3rd base line being a and the distance between the runner and either 1st or 3rd base being b.
When 90 < d < 180, d(t) = √(8100 + 18t - 90)
When 180 < d > 270, d(t) = √(8100 + 270 - 18t)
Standing on 2nd base, d(t) = √(8100 + 8100), because a and b are the 90 ft between 1st and 2nd.