The distance between the friends at the end of one hour can be found from the Pythagorean theorem to be
.. d = √(40^2 +35^2) = √2825 = 5√113 ≈ 53.15 . . . . miles
Since the friends are continuing in the same directions at the same speeds, their distance apart will increase by this amount each hour.
distance = t*5√113 . . . . miles after t hours