Finding an intersection between 2 lines I got 2 (2d) lines, one of them is defined by 2 points $(x_1, y_1)$ $(x_2, y_2)$, and the other one is represented by the normal $y = ax + b$ equation.

Now, I want to calculate the $(x, y)$ of the point of intersection (given that $x_1$ is not equal to $x_2$)

What is the formula to this point's $x$ and $y$?

Thanks.
Hints:

Any point on the first line has coordinates $(tx_1+(1-t)x_2, ty_1+(1-t)y_2)$ for some $t$.

A particular $t$ will make this lie on the second line
Here’s a way to do this using homogeneous coordinates: The line through two points is given by the cross product of the points, and the intersection of two lines is also given by their cross product. This method works quite well when you have concrete values for the points/coefficients, but can get messy if you try to derive general formulas.  

Given two points $(x_1,y_1)$ and $(x_2,y_2)$, the line through them is $$(x_1,y_1,1)\times(x_2,y_2,1)=(y_1-y_2,x_2-x_1,x_1y_2-x_2y_1).$$ For the equation $y=mx+b$, we get $$(0,b,1)\times\left(-b,0,m\right)=\left(bm,-b,b^2\right).$$ After computing the cross product of these two results, you get something that doesn’t have a $1$ as its last coordinate, so you have to divide by that value, finally resulting in $$\begin{align}
x &amp;= {(x_1y_2-x_2y_1)+b(x_2-x_1) \over (y_2-y_1)-m(x_2-x_1)}\\
y &amp;= {m(x_1y_2-x_2y_1)+b(y_2-y_1) \over (y_2-y_1)-m(x_2-x_1)}
\end{align}$$ for the intersection point. This is exactly the result you get by solving the system of equations for the two lines.  

As a concrete example, take the line given by $y=-3x+5$ and the line through the points $(-3,1)$ and $(1,3)$: $$
(-3,1,1)\times(1,3,1) = (-2,4,-10) \\
(0,5,1)\times(-5,0,-3)=(-15,-5,25) \\
(-2,4,-10)\times(-15,-5,25) = (50,200,70),
$$ so the lines intersect at $\left(\frac57,\frac{20}7\right)$, which you can verify by solving the system of equations for these lines.