There's a brief note in this book on how Khayyam bumped into having to solve a cubic.
I'll only make the note that you should remember the context of the time: there was no concept of negative, much less complex, solutions. Corresponding to our current Cartesian system, Khayyam only looked at intersections in the first quadrant.
Another note should be made that the curves of the time were constructed with geometric tools (straightedge, compass, and a bunch of other contraptions), and $y=x^3$ isn't really a sort of curve that easily lends itself to such a construction (but is now easily constructed thanks to our current knowledge of coordinate geometry).
Here is a more explicit mention of the hyperbola-circle intersection problem Khayyam studied and was mentioned in the OP.
Here is a (more or less) complete table of all the intersection cases Khayyam studied. (The book has an appendix containing a (translated) section of Khayyam's work.)
Here is yet another reference.
(I'll keep updating this answer as I comb through more books; watch this space! As an aside, it's funny that my attempts to look for answers to this question are leading me to references for this question!)
Say the four points are $(x_1, y_1)\ldots (x_4, y_4)$.
You want $a,b,c,d$ to satisfy the four equations: $$y_1 = ax_1^3 + bx_1^2 + cx_1 + d\\
y_2 = ax_2^3 + bx_2^2 + cx_2 + d\\
y_3 = ax_3^3 + bx_3^2 + cx_3 + d\\
y_4 = ax_4^3 + bx_4^2 + cx_4 + d$$
Do you know how to solve four linear equations in four unknowns?
I will work an example, since it is not hard to pick up. Let's say we have points $(1,3), (2,9), (3,27), (4,63)$. Then we get the four equations:
$$\begin{eqnarray}
3 &=& a + b + c + d\\
9 &=& 8a + 4b + 2c + d\\
27 &=& 27a+ 9b + 3c + d\\
63 &=& 64a + 16b + 4c + d
\end{eqnarray}$$
We start by subtracting each equation from the following equation, which eliminates all the $d$'s:
$$\begin{eqnarray}
6 &=& 7a + 3b + c \\
18 &=& 19a + 5b + c \\
36 &=& 37a+ 7b + c
\end{eqnarray}$$
Again we subtract each equation from the following one, which eliminates the $c$'s:
$$\begin{eqnarray}
12 &=& 12a + 2b \\
18 &=& 18a + 2b
\end{eqnarray}$$
We could subtract again, giving $6a=6$, so $a=1$, or
we can solve this pair of equations by inspection: evidently $a=1$ and $b=0$.
Then we substitute $a=1$ and $b=0$ back into one of the previous batch of equations, say $6 = 7a + 3b + c$, giving $6 = 7 + c$ and then $c=-1$.
Then we substitute $a=1, b=0, c=-1$ into one of the original equations, say $3 = a + b + c + d$, giving $3 = 1-1+d$ and so $d=3$.
Now we have $a=1, b=0, c=-1, d=3$, so the cubic polynomial we found is $y= x^3 -x + 3$, which is correct.
Best Answer
$$\large\color{red}{\text{You do not learn anything using blindly any software !!!}}$$
Making the problem more gereral for four data points, the equations are $$y_1=a \,x_1^3+b \,x_1^2+c\, x_1+d \tag 1$$ $$y_2=a \,x_2^3+b \,x_2^2+c\, x_2+d \tag 2$$ $$y_3=a \,x_3^3+b \,x_3^2+c\, x_3+d \tag 3$$ $$y_4=a \,x_4^3+b \,x_4^2+c\, x_4+d \tag 4$$
So $$y_2-y_1=a(x_2^3-x_1^3)+b(x_2^2-x_1^2)+c(x_2-x_1)$$ $$y_3-y_2=a(x_3^3-x_2^3)+b(x_3^2-x_2^2)+c(x_3-x_2)$$ $$y_4-y_3=a(x_2^4-x_3^3)+b(x_4^2-x_3^2)+c(x_4-x_3)$$
Use the factorization and divide $$\color{red}{z_1}=\frac{y_2-y_1}{x_2-x_1}=a(x_2^2+x_1x_2+x_1^2)+b(x_2+x_1)+c \tag 5$$ $$\color{red}{z_2}=\frac{y_3-y_2}{x_3-x_2}=a(x_3^2+x_2x_3+x_2^2)+b(x_3+x_2)+c \tag 6$$ $$\color{red}{z_3}=\frac{y_4-y_3}{x_4-x_3}=a(x_4^2+x_3x_4+x_3^2)+b(x_4+x_3)+c \tag 7$$
Repeat the process $$\color{red}{w_1}=\frac{z_2-z_1}{x_3-x_1}=a(x_1+x_2+x_3)+b \tag 8$$ $$\color{red}{w_2}=\frac{z_3-z_2}{x_4-x_2}=a(x_2+x_3+x_4)+b \tag 9$$ One more step $$w_2-w_1=a(x_4-x_1) \qquad \implies \qquad \color{red}{a=\frac{w_2-w_1 }{x_4-x_1}} \tag {10}$$
Go back to $(9)$ to obtain $\color{red}{b}$; go back to $(7)$ to obtain $\color{red}{c}$; go back to $(4)$ to obtain $\color{red}{d}$.
$$\huge\color{red}{\text{End of the story}}$$