f(x) = a·x·(x + 2)^2·(x - 1)
f(-1) = 2·a = -2 --> a = -1
f(x) = - x·(x + 2)^2·(x - 1)
f(x) = - x^4 - 3·x^3 + 4·x
g(x) = a·(x + 3)·(x - 2)^2
g(1) = a·(1 + 3)·(1 - 2)^2 = 4·a = 1 --> a = 1/4
g(x) = 1/4·(x + 3)·(x - 2)^2
g(x) = 0.25·x^3 - 0.25·x^2 - 2·x + 3