Assuming you want the equation in slope intercept form, you first need to use slope formula to find the slope.
Plug in the coordinates that you have, (3,-1) and (4,7), for the x and y values respectively.
Which reduces to 8/1=8.
The slope of your equation is 8.
Slope intercept form is: y=mx+b. m is your slope and b is your y-intercept, x and y stay unchanged.
Plug the slope in:
y=8x+b.
Now, you can plug one of the sets of coordinates into the x and y of the equation to find b. I'm using (3,-1).
-1=8(3)+b
-1=24+b
Subtract 24 from both sides.
-25=b
Now plug this into the equation!
y=8x-25 is your final equation.
I hope this helps :)