First, find the derivative of $y$ with respect to $x$:
$$y'=3ax^2+2bx+c$$
And because of the tangent points given, we know that
$$3a(-2)^2+2b(-2)+c=0$$
$$3a(2)^2+2b(2)+c=0$$
And since the graph of the cubic must pass through those points,
$$a(-2)^3+b(-2)^2+c(-2)+d=7$$
$$a(2)^3+b(2)^2+c(2)+d=1$$
When we simplify these equations, we get as system of four equations with four variables to solve for:
$$12a-4b+c=0$$
$$12a+4b+c=0$$
$$-8a+4b-2c+d=7$$
$$8a+4b+2c+d=1$$
This system can be solved easily using matrices. After solving, we get
$$a=\frac{3}{16}$$
$$b=0$$
$$c=-\frac{9}{4}$$
$$d=4$$
So the cubic must be
$$y=\frac{3}{16}x^3-\frac{9}{4}x+4$$