The slope of the displacement time graph at an instant gives the velocity at that instant.
The velocity of body = slope of displacement time graph. Therefore the line having greater slope has greater velocity, i.e. the body B has greater velocity. Ratio of their velocities,