first off, let's notice the graph touches the x-axis at -1 and 3, namely, those are the zeros/solutions/roots of the polynomial and therefore, the factors come from those points.
now, at -1, the graph doesn't cross the x-axis, instead it <u>simply bounces off</u> of it, that means the zero of x = -1, has an even multiplicity, could be 4 or 2 or 6, but let's go with 2.
at x = 3, the graph does cross the x-axis, meaning it has an odd multiplicity, could be 3 or 1, or 7 or 9, but let's use 1.