Same formula plug in the values and solve for k.
<a href="http://www.codecogs.com/eqnedit.php?latex=P = \left ( \frac{mx_{2} - nx_{1}}{m-n} , \frac{my_{2} -ny_{1}}{m-n}\right )\\\\ (5 ,7) = \left ( \frac{k(3) -1(-1)}{k-1}, \frac{k(5)-1(1)}{k-1} \right )\\\\ (5.7) = \left ( \frac{3k @plus; 1}{k-1}, \frac{5k -1}{k-1} \right ) \\\\\therefore 5 = \frac{3k@plus;1}{k-1} ~and~ 7= \frac{5k-1}{k-1} \\\\ 5k-5=3k@plus;1\\\2k = 6 \\\ \therefore k = 3" target="_blank"><img src="http://latex.codecogs.com/gif.latex?P = \left ( \frac{mx_{2} - nx_{1}}{m-n} , \frac{my_{2} -ny_{1}}{m-n}\right )\\\\ (5 ,7) = \left ( \frac{k(3) -1(-1)}{k-1}, \frac{k(5)-1(1)}{k-1} \right )\\\\ (5.7) = \left ( \frac{3k + 1}{k-1}, \frac{5k -1}{k-1} \right ) \\\\\therefore 5 = \frac{3k+1}{k-1} ~and~ 7= \frac{5k-1}{k-1} \\\\ 5k-5=3k+1\\\2k = 6 \\\ \therefore k = 3" title="P = \left ( \frac{mx_{2} - nx_{1}}{m-n} , \frac{my_{2} -ny_{1}}{m-n}\right )\\\\ (5 ,7) = \left ( \frac{k(3) -1(-1)}{k-1}, \frac{k(5)-1(1)}{k-1} \right )\\\\ (5.7) = \left ( \frac{3k + 1}{k-1}, \frac{5k -1}{k-1} \right ) \\\\\therefore 5 = \frac{3k+1}{k-1} ~and~ 7= \frac{5k-1}{k-1} \\\\ 5k-5=3k+1\\\2k = 6 \\\ \therefore k = 3" /></a>