Given two points, use the two-point form of the equation for a line:
Just substitute the x- and y-coordinate values from the two given points. Depending on the instructions in the problem, or your instructor's directions, you may have to rearrange the equation to be in some particular form, such as standard form: or possibly slope-intercept form: .
Given the slope and a point, use the point-slope form of the equation for a line:
,
and substitute the value for the slope for and the x- and y-coordinates of the given point. Same instructions about the final form.