Step 1: Pick out the x-intercepts.
Out of the three given points, only $(5,0)$ and $(-2,0)$ lie on the x-axis, so $x=5$ and $x=-2$ are the zeroes of $f(x)$.
Step 2: Test the options instead of building the factors from scratch.
A correct factor must become zero exactly at $x=5$ or $x=-2$. Check $(x+2)$: at $x=-2$ it gives $0$. Check $(x-5)$: at $x=5$ it gives $0$.
Step 3: Confirm no other option satisfies both zeroes.
$(x+5)$ would need a zero at $x=-5$, and $(x+1)$ would need a zero at $x=-1$, neither of which is a given intercept, so those pairs are ruled out.
\[ \boxed{(x+2)(x-5)} \]