Constructing a cubic given four points
Linear functions (degree $1$ polynomials) $p(x)$ have constant first differences $(\Delta^1f)(x)=f(x)-f(x-1)$, quadratic functions have constant second differences $(\Delta^2f)(x)=(\Delta^1f)(x)-(\Delta^1f)(x-1)$, and so on. You can use this fact to find $f(0)$ as shown below. First, from the known values, calculate the forward differences (red) from left to right, then copy the constant third difference (blue), and finally “back-calculate” to $f(0)$ (purple).
There is a conceptually simpler way: do some linear algebra and polynomial arithmetic. Instead of a complex linear system, solve $4$ much simpler linear systems. Namely, solve the following problems: find polynomials $p(x), q(x), r(x), s(x)$ such that: \begin{align} (a)\enspace&\begin{cases}p(3)=1\\p(4)=0\\p(5)=0\\p(6)=0\end{cases} &(b)\enspace&\begin{cases}q(3)=0\\q(4)=1\\q(5)=0\\q(6)=0\end{cases} &(c)\enspace&\begin{cases}r(3)=0\\r(4)=0\\r(5)=1\\r(6)=0\end{cases} &(d)\enspace&\begin{cases}s(3)=0\\s(4)=0\\s(5)=0\\s(6)=1\end{cases} \end{align} Then the solution is $$f(x)=2p(x)+4q(x)-3r(x)+8s(x).$$
Reminder:
Let $K$ be a field, $\alpha\in K$, $f(x)$ a polynomial in $K[x]$. Then, $$f(\alpha)=0\iff x-\alpha\enspace\text{divides}\enspace f(x).$$
You can directly find out the polynomial $f$ by considering it according as the $x$-values available:
Let $f(x)=a_0+a_1(x-3)+a_2(x-3)(x-4)+a_3(x-3)(x-4)(x-5)$ for real constants $a_0,a_1,a_2,a_3$. Note that we don't need to take into account the value $x=6$ as this is already a cubic polynomial.
Then, $f(3)=2\Rightarrow a_0=2$
$f(4)=4\Rightarrow a_1=2$
$f(5)=-3\Rightarrow a_2=-\frac{9}{2}$
$f(6)=8\Rightarrow a_3=\frac{9}{2}$
Thus, $f(x)=2+2(x-3)-\frac{9}{2}(x-3)(x-4)+\frac{9}{2}(x-3)(x-4)(x-5)$.
I think the calculations are pretty simple this way as you have chosen $f$ to be such.