You fill in both points as x and y values in the generic equation, and end up with two equations with m and b as variables. You solve m and b in that system (e.g., by filling in b from one equation into the other) and then you have your line equation!