Answer
$(2,2)$.
Work Step by Step
Step 1. Let the point be $P(x,y)$, we have $y=x$ since it is on the line.
Step 2. Its distance $(d)$ to $(3,1)$ satisfies $d^2=(x-3)^2+(y-1)^2=(x-3)^2+(x-1)^2$
Step 3. Let $f(x)=(x-3)^2+(x-1)^2=2x^2-8x+10$
Step 4. The minimum of $f(x)$ happens when $x=-\frac{-8}{2(2)}=2$, thus we have $P(2,2)$.