Let #P_i = (x_i, y_i) and r# be the line #P_1P_2#.
#r: (x,y) = P_1 + t (P_2 - P_1)#
#y_3 = x_3 (y_1 + y_2) / (x_1 + x_2)#
#P_3 in r Leftrightarrow exists t in RR ; (x_3, y_3) = (x_1, y_1) + t(x_2-x_1, y_2-y_1)#
#x_3 = x_1 + t (x_2 - x_1) and x_3 (y_1 + y_2) / (x_1 + x_2) = y_1 + t(y_2 - y_1)#
#t = (x_3 - x_1)/(x_2 - x_1) and#
#x_3 (y_1 + y_2) / (x_1 + x_2) = y_1 + (x_3 - x_1)/(x_2 - x_1)(y_2 - y_1)#
#Rightarrow x_3 (y_1 + y_2)(x_2 - x_1) = y_1 (x_1 + x_2)(x_2 - x_1) + (x_1 + x_2)(x_3 - x_1)(y_2 - y_1)#
#Rightarrow x_2 x_3 y_1 + x_2 x_3 y_2 - x_1 x_3 y_1 - x_1 x_3 y_2 = x_2^2 y_1 - x_1^2 y_1 + (x_1 x_3 - x_1^2 + x_2 x_3 - x_2 x_1)y_2 + (- x_1 x_3 + x_1^2 - x_2 x_3 + x_2 x_1)y_1#
#Rightarrow 0 = (2 x_1 x_3 - x_1^2 - x_2 x_1)y_2 + (- 2 x_2 x_3 + x_2 x_1 + x_2^2)y_1#