Train A whose length is four-fifth of that of train B crosses it travelling in opposite direction in