Train A whose length is four-fifth of that of train B crosses it traveling in opposite direction in a time which is 4/7th of the time taken by train A to cross it when traveling in same direction.
Calculate the ratio of the speeds of train A and train B.