As given plane $x+y-z=\frac{1}{2}$ divides the line joining the points $A(2,1,5)$ and $B(3,4,3)$ at a point $C$ in the ratio $k: 1$.
Then coordinates of $C$
$\left(\frac{3 k+2}{k+1}, \frac{4 k+1}{k+1}, \frac{3 k+5}{k+1}\right)$
Point $C$ lies on the plane,
$\Rightarrow $ Coordinates of $C$ must satisfy the equation of plane.
So, $\left(\frac{3 k+2}{k+1}\right)+\left(\frac{4 k+1}{k+1}\right)-\left(\frac{3 k+5}{k+1}\right)=\frac{1}{2} $
$\Rightarrow 3 k+2+4 k+1-3 k-5=\frac{1}{2}(k+1)$
$\Rightarrow 4 k-2=\frac{1}{2}(k+1) $
$\Rightarrow 8 k-4=k+1$
$ \Rightarrow 7 k=5$
$\Rightarrow k=\frac{5}{7}$
Ratio is $5: 7$.