Let us call the time as
and the distance as
.
It is given that the time between seeing lightning and hearing thunder varies directly with the distance away from the lightning.
Mathematically, this direct variation is represented as:

Now, to remove the
sign we replace it by an equal to sign (=) and a constant of variation, k. (Please note that this is an important step)
Thus, the above equation becomes:

In order to find the constant of variation, k, we isolate k by dividing both sides of the above equation by d. Thus, we get:

Plugging in the values of t and d given in the question, we get:
seconds per mile.
Therefore, the constant of variation for this problem is 5 seconds per mile.