Coordinates? Lines don't have coordinates. Points have coordinates, and lines have properties such as slope and Y-intercept.
Assuming you have points that are supposed to represent lines, you can calculate the slope and y-intercept using the same formula from calculus.
Slope = (Y2 - Y1) / (X2 - X1)
If X2 = X1 then you'll just have to set Slope to a really big value.
Y-intercept = Y1 - Slope * X1
Do this for both lines so that you have a slope and y-intercept for both lines.
Next you'll want to compare the Slopes of these two lines and make sure that these two lines are not parallel.
If Slope1 = Slope2 Then the lines are parallel.
The remainder of the code would be run if Slope1 <> Slope2, or in the Else of the above slope equality check.
If Slope1 <> Slope2 Then
'rest of stuff.
To determine where (it's not If, since lines will cross unless they are parallel) the two lines cross... you know there must be a point where the same X-coordinates put into both line equations Y = MX + B will produce the same Y.
So, therefore you find the X that will produce the same Y by setting them equal.
M1 * Xc + B1 = M2 * Xc + B2
And solve for Xc = (M2 - M1) / (B1 - B2)
Put Xc into a line equation: Yc = M1 * Xc + B1
to find the Yc coordinate.
And this is the intersection point: Xc. Yc