Question 291540
First of all, let us assume normal speed to be s and normal time be t.
Now the distance become st(Distance = speed x time).
According to the first statement, increased speed becomes s+3 and therefore time decreases by (t - 40/60) that is t - 2/3.
therefore the distance by new speed and time becomes (s + 3)(t - 2/3).
Now let us equate the first distance by the second one above since distance is same.
it becomes 
st = (s+3)(t - 2/3)
Rearranging this becomes,
2s -9t = -6..........(I)

Now According to the second statement, decreased speed becomes s-2 and therefore increased time becomes t + 2/3
Again the distance by new speed and time becomes (s-2)(t + 2/3).
Now, again equate this distance by original distance st.
st = (s-2)(t + 2/3)
Rearranging this,
-2s + 6t = -4 ...... (II)

Now you have two linear equation (I) and (II)
Solve these to get values of s and t
which is s = 12  and t = 10/3

Now distance is st therefore 12 x 10/3 = 40 km