How do I do the following problem usingdirect/indirect variationmethod?

A train 210m long took 12 seconds to pass a 90m long tunnel. Find the speed of the train.

Using speed, distance & time formula, this can be easily done using the formula

Speed = Distance/Time

Speed = (210 + 90)/12

Speed = 300/12

Speed = 25 m/sec (or 90 km/hr)

But how do I do this problem using direct/indirect variation?

Thanks,

Ron