Difficult Astrophysics question, Need help please?

Hi, I have done this problem multiple times and always seem to come up with the wrong answer.
Any help is greatly appreciated!
Scientists using the Hubble Space Telescope have observed Cepheids in the galaxy M 100. Here are the actual data for three Cepheids in M 100:
Cepheid 1: luminosity = 3.9 x 10^30 watts, brightness 9.3 x 10^-19 w/m^2
Cepheid 2: luminosity = 1.2 x 10^30 watts, brightness 3.8 x 10^-19 w/m^2
Cepheid 3: luminosity = 2.5 x 10^30 watts, brightness 8.7 x 10^-19 w/m^2

Compute the distance to M 100 with data from each of the three Cepheids in light-years (d1, d2, d3)

Fred2011-02-21T21:40:00Z

For a source emitting isotropically (same in all directions), with total power (luminosity) L, at a distance r, the power intensity (called "brightness" in this problem), I, is just L divided by the area of a sphere of radius r (because when it has travelled that distance in all directions, it has spread out evenly over that size sphere):

I = L/ 4πr^2

So knowing L and I, you get r from:
r = √(L/ 4πI)
This will come out in meters for the values given, so convert to lt-yr using:
1 lt-yr = c*yr
= 2.9979*10^8 m/s * 365.24*86400 s
= 9.46*10^15 m

Anonymous2011-02-21T21:46:36Z

L₀ = sun's luminosity
L₀ = 3.846e26 watts
m₀ = sun's apparent magnitude from Earth
m₀ = −26.74
F₀ = sun's luminous flux at Earth
F₀ = 1368 Wm⁻²
d₀ = 1 parsec
d₀ = 3.08568e16 meters

M = 4.83 − 2.5 log(L/L₀)
M = 71.293 − 2.5 log L

m − M = 5 log(d/d₀) − 5
m − M = 5 log d − 87.447

d = 10^(0.2m − 0.2M + 17.489)
d = 10^(0.2m + 0.5 log L + 3.23)

m = m₀ − 2.5 log(F/F₀)

d = 10^[0.2m₀ − 0.5 log(F/F₀) + 0.5 log L + 3.23]

d = 10^[ 0.5 log L − 0.5 log F − 0.55 ]

The equation just above uses MKS units for distance, luminosity, and luminous flux. Note that when L=L₀ and F=F₀ , then d is approximately equal to one astronomical unit. The error is one tenth of one percent.

Cepheid 1.
F = 9.3e-19 Wm⁻²
L = 3.9e30 W
d = 5.77e23 m = 18.7 Mpc

Cepheid 2.
F = 3.8e-19 Wm⁻²
L = 1.2e30 W
d = 5.01e23 m = 16.2 Mpc

Cepheid 3.
F = 8.7e-19 Wm⁻²
L = 2.5e30 W
d = 4.78e23 m = 15.5 Mpc

The "book value" for the distance to the M100 galaxy is 16.8 megaparsecs. So these numbers are definitely in the right ballpark.