So long as you remember that distances are always zero or positive, the order in which you subtract one x-coordinate from another does not matter.
Example: |A-B| = |B-A|.
Communication of this situation is clearer, however, if you write algebraically larger x-coordinate first and the subtrahend second.