to solve this we can get the equation in the form
F(x)=a(x-X1)(x-X2)
where X1 and X2 are the values of X where the line cross the axial X
in this case
X1= -1
X2= 2
so the function will be
F(x)=a*(x+1)*(x-2)
now we need to find the value of a
So for this we can replace with a random point of the curve, for example the point x= 0 y=-2
So if we replace
-2=a*(0+1)*(0-2)
-2=a*1*-2
-2=a*-2
-2/-2=a=1
So the answer is:
F(x)=1*(x+1)*(x-2)