Let, $y^2=x^3+Ax+B$ is a curve and I want to find $A, B$ so that 4 points $L, M, N, P$ are on the curve $y^2=x^3+Ax+B$. I know the coordinates of $L, M, N, P$, so I can find 4 linear equation of variable $A, B$ by putting the values of $x, y$ in to the cubic equations, but how do I solve them?
I can find $A, B$ when there are 2 equations, but don't know how to solve $4$ linear equations for 2 variables, how can I do that?
If the four points are truly on the curve, you can choose two of them and solve for $a,b$. The other two point will fit.
If they don't fit, your problem has no solution, the four points do not all belong to such a curve.
A more geometric solution is to plot $y^2-x^3$ in terms of $x$, for the four points. This defines the straight line $ax+b$.