I have 2 lines. Both lines containing their 2 points of X and Y. This means they both have length.
I see 2 formulas, one using determinants and one using normal alge
Assuming you have two lines of the form Ax + By = C, you can find it pretty easily:
Ax + By = C
float delta = A1 * B2 - A2 * B1; if (delta == 0) throw new ArgumentException("Lines are parallel"); float x = (B2 * C1 - B1 * C2) / delta; float y = (A1 * C2 - A2 * C1) / delta;
Pulled from here