I don't know if this question is already asked but can't find a solution for it.
Example i have these 2 points on the x-y plane $(2,1)$ and $(5,4)$
And then connects it to make a line
How am i able to get a formula for the x and y positions of other points on the line?
In order to find a line that passes through any two points $(x_0,y_0)$ and $(x_1,y_1)$ you must first find the slope, which is given by $\frac{y_1-y_0}{x_1-x_0}$. Then you must find the y-intercept, which is the difference between $y_0$ and the value of $\frac{y_1-y_0}{x_1-x_0}x_0$. In the end, your line will be given by the formula $$y=\frac{y_1-y_0}{x_1-x_0}x+y_0-\frac{y_1-y_0}{x_1-x_0}x_0$$ To find the coordinates of other points on the line, plug in the x-values of the points into this formula.