What you need to do is graph each of the given functions and note where those curves cross the x axis. These locations are the x intercepts or roots.
The first graph shown has one root and it is x = 3. The graph of f(x) = x^3 - 3x^2 + x - 2 also has one root and that root is x = 3. So this function matches with the first graph shown.
The second graph has 2 roots at x = 1 and x = 4. The function that also has these two roots is g(x) = x^2 - 5x + 4
Finally, the third graph has only one root at x = -2. The function that has this same root (and only this root) is h(x) = -4x - 8
Note: if you don't have a graphing calculator, I recommend using free online tools such as geogebra or desmos to graph these functions.