If m1, m2, x1, x2, y1, y2 are known then using this formulae you can find them
X = [(2*y1)/(m2-m1)] – [(2*m1*x1)/(m2-m1)] + [(m1*x1)/(m2-m1)] + [(m2*x2)/(m2-m1)] + [(y1+y2)/(m2-m1)]
and for y:
Y = [(y1+y2)/2] + [(m1+m2)*X/2] – [(m1*x1)/2] – [(m2*x2)/2]
Note: In the formula for Y appears X, but if you compute it before it is not a problem
0
solved solving equations and finding values of x and y from two equations in c programming