You can't write THE equation of a line. There are an infinite number of ways to write an equation whose solution set is a uniques set of ordered pairs mapping to points on the coordinate plane which in turn form a straight line in Euclidian space. However, you can write AN equation whose solution set contains the two given points and all other points colinear with the given points; just use the two-point form of an equation of a straight line:
where and are the coordinates of the given points.
Check with your teacher/instructor/professor as to the desired form of the answer to this question. Two typical forms are slope-intercept and standard form:
Note: Some texts/teachers/professors/mathematicians-in-general (but not all) insist that the coefficients in the standard form be integers.
Also note that the two forms are related by the following:
John
My calculator said it, I believe it, that settles it