Well there are multiple different ways to write the equation of a line. The easiest way to do so in this situation would be to use point-slope form: (y-y_1)=m(x-x_1)
y_1 is the y coordinate of any point on the line, x_1 is the x-coordinate of the same point, and m is the slope. In this case it would look like (y-7)=3(x-5).
However, you might be required to answer in slope-intercept form. The equation of the line would then look like y=mx+b, where m is the slope, and b is the y-intercept. To solve for b we need to plug in the point (5,7) into the equation:
y=3x+b
(7)=3(5)+b
7=15+b
b=-8
Now plug b back into the initial equation and then you have your final, fully formed equation:
y=3x-8