We can actually measure the distance between the location of lightning and an observer according to his observation. Let's illustrate that by treating the question in a book by Paul Hewitt.
What is the approximate distance of a thunderstorm when you note a 3-s delay between the flash of lightning and the sound of thunder?
To make things easier, let's assume that the speed of light is 300,000,000 m/s and that the speed of sound is about 340 m/s (speed of sound in air at 20 deg Celsius). Indeed, light travels faster than sound. Consequently, when light and sound came from the same source, light arrives to a certain destination first.
Variables and Relationships
Let
$latex \displaystyle t_{L}$ be the time for light to travel the distance between the origin of lighning and you.
and
$latex \displaystyle t_{S}$ be the time for sound to travel the same distance.
From the question, 3-s delay between the flash of lightning and the sound of thunder, we can translate this into a mathematical equation.
$latex \displaystyle t_{S}=t_{L}+ 3 \textup{ s} \longrightarrow (\textup{Eq.} 1) $
Let's call this as Eq. 1.
Both travel at constant speeds. So, the relationship among the speed, distance travelled and time can be expressed mathematically as
$latex v_{S}=\frac{d}{t_{S}} \longrightarrow (\textup{Eq.} 2) $
$latex v_{L}=\frac{d}{t_{L}} \longrightarrow (\textup{Eq.} 3) $
Solution
We substitute the expressions for the times described by Eq. 2 and Eq. 3 into Eq. 1 and we'll have.
$latex \frac{d}{v_{S}} = \frac{d}{v_{L}} + 3 \textup{ s} $
Now, we have one equation with only one unknown, that is, d.
$latex \frac{d}{v_{S}} - \frac{d}{v_{L}} = 3 \textup{ s} $
$latex d \Bigg (\frac{1}{v_{S}} - \frac{1}{v_{L}} \Bigg) = 3 \textup{ s} $
$latex d = \frac {3 \textup{ s}}{\cfrac{1}{v_{S}} - \cfrac{1}{v_{L}} }$
$latex d = \frac {3 \textup{ s}}{\cfrac{1}{340 \textup{ m/s}} - \cfrac{1}{300,000,000 \textup{ m/s}} }$
$latex d = 1,020 \textup{ m } $
And that's the distance we're looking for. Well, this is just an estimate. Here we've rounded off the value of speed of light. In reality it's not really exactly 300,000,000 m/s. Also, the sound may not really be 340 m/s but may depend on the temperature of the air in the surrounding. But anyway, the important thing here is the process in solving the question and not the values. :-)
$latex d = \frac {3 \textup{ s}}{\cfrac{1}{340 \textup{ m/s}} - \cfrac{1}{300,000,000 \textup{ m/s}} }$
$latex d = 1,020 \textup{ m } $
And that's the distance we're looking for. Well, this is just an estimate. Here we've rounded off the value of speed of light. In reality it's not really exactly 300,000,000 m/s. Also, the sound may not really be 340 m/s but may depend on the temperature of the air in the surrounding. But anyway, the important thing here is the process in solving the question and not the values. :-)