# Plot lines and measure the distances between them

I have the following code:

aJ = 5.2;
OmJ = N[2 Pi/aJ^(3/2)]
{val1} = NSolve[o/OmJ == 2., o]
{val2} = NSolve[o/OmJ == 3., o]
{val3} = NSolve[o/OmJ == 5./2., o]
{val4} = NSolve[o/OmJ == 7./2., o]
{val5} = NSolve[o/OmJ == 4., o]
{val6} = NSolve[o/OmJ == 3./2., o]
{val7} = NSolve[o/OmJ == 5./3., o]
{val8} = NSolve[o/OmJ == 7./3., o]

d = 7;
n = 6;
p = ListPlot[
Flatten[Table[{o /. NSolve[o/OmJ == j/i, o], n}, {j, 2, 9, 1}, {i,
1, 4, 1}], 1],
Filling -> Axis, AxesLabel -> {"mean motion", "par"},
FillingStyle -> {Red}, PlotRange -> {{0.3, 2.2}, {0, 800}},
PlotMarkers -> Automatic, PlotStyle -> Black, ImageSize -> 700,
Epilog -> {{AbsolutePointSize[8], Black,
Text["Jupiter Position", {OmJ, 1}],
Point[{OmJ, 0.1}]},
{Blue, Text[Style["2:1", Bold, Black, 16], {o /. val1, d}],
Text[Style["3:1", Bold, Black, 16], {o /. val2, d}],
Text[Style["5:2", Bold, Black, 16], {o /. val3,  d}],
Text[Style["7:2", Bold, Black, 16], {o /. val4,  d}],
Text[Style["4:1", Bold, Black, 16], {o /. val5,  d}],
Text[Style["3:2", Bold, Black, 16], {o /. val6,  d}],
Text[Style["5:3", Bold, Black, 16], {o /. val7,  d}],
Text[Style["7:3", Bold, Black, 16], {o /. val8,  d}]}}];

t = Show[{p}, PlotRange -> {{0.3, 2.2}, {0, 8}}, ImageSize -> 600]


And i like to draw also lines under every texts.

Then i like to know in such a way how far (the distance) a line is from another one.

I red this post: Distance between point and line segments but i ddin't understand a lot.

-