Step 1: Parametrise the line.
The foot $N$ from $P(5,-1,3)$ lies on line $AB$ with $A(1,3,-5)$ and $B(3,-1,5)$. Write $N=A+t(B-A)$ for some parameter $t$.
Step 2: Direction vector.
\[ \overrightarrow{AB}=(2,-4,10). \]
So $N=(1+2t,\;3-4t,\;-5+10t)$.
Step 3: Vector from $P$ to $N$.
\[ \overrightarrow{PN}=(2t-4,\;4-4t,\;10t-8). \]
Step 4: Apply perpendicularity.
Since $PN\perp AB$, set $\overrightarrow{PN}\cdot\overrightarrow{AB}=0$:
\[ 2(2t-4)-4(4-4t)+10(10t-8)=0. \]
Step 5: Solve for $t$.
This is $4t-8-16+16t+100t-80=0$, i.e. $120t-104=0$, so $t=\dfrac{13}{15}$.
Step 6: Convert $t$ to a ratio.
$N$ divides $AB$ as $AN:NB=t:(1-t)=\dfrac{13}{15}:\dfrac{2}{15}=13:2$.
\[ \boxed{13:2} \]