We let x be the rate of the first runner. With this representation, the rate of the second runner is then x + 2. The distance covered by the runners is the product of the rate and the time they ran. In equation,
D = r1t1 + r2t2
The values of both t1 and t2 are equal to 3 hours. Substituting the known values to the equation,
30 km = (x)(3) + (x + 2)(3)
The value of x from the equation is 4.
Therefore, there speeds are 4 km/h and 6 km/h.