f(3)=7 and f(1)=5, is just another way to say x = 3 and y = 7, as well as x = 1 and y = 5, which gives us the points of (3,7) and (1,5), so let's use them,
[tex]\bf \begin{array}{ccccccccc}
&&x_1&&y_1&&x_2&&y_2\\
% (a,b)
&&(~ 3 &,& 7~)
% (c,d)
&&(~ 1 &,& 5~)
\end{array}
\\\\\\
% slope = m
slope = m\implies
\cfrac{\stackrel{rise}{ y_2- y_1}}{\stackrel{run}{ x_2- x_1}}\implies \cfrac{5-7}{1-3}\implies \cfrac{-2}{-2}\implies 1
\\\\\\
% point-slope intercept
\stackrel{\textit{point-slope form}}{y- y_1= m(x- x_1)}\implies y-7=1(x-3)
\\\\\\
y-7=x-3\implies y=x+4[/tex]