As an example this is part

Rearrange line to y=4x/3 +14/3 So gradient =4/3 Hence perpendicular will have gradient -3/4

Let (a,b) be foot of the perpendicular. Then line joining (-3,-1) to (a,b) has gradient -3/4

So (b+1)/(a+3)=-3/4 This rearranges to 4b+3a=-13 But (a,b) is on the original line so 3b-4a-14=0

Solving these simultaneous equations get a=-19/5 b==-2/5

So for answer you want distance between (-3,-1) and (-19/5,-2/5)