The distance between (1, 3) and the line passing through (2.5, 3) and (4, 1):

We can draw the figure with line_P  (see the code;  se also here).

The distance between (3.25, 2) and the line passing through (2.5, 3) and (4, 1):