A bus travels at a speed of 40 miles per hour and reaches Hogville in 40 minutes. If a cab takes 35 minutes to reach the same spot, determine the speed at which it traveled.