Right, AB would be a ray starting at 'a', passing through 'b', and continuing on past 'b'. BA would be a ray starting at 'b', passing through 'a', and continuing on past 'a'.
The two rays share only the line segment ab. They do NOT share the direction of travel.