They arent directly related
Aragorn is only a lil related to the king two generations b4 - the last two kings werent direct heirs of Anárion
but the last descendant's daughter Fíriel wedded Arvedui king of Arnor and ancestor of Aragorn 😛
Anach
a pass near taur-nu-fuin