Find the minimum value of
\[\frac{(x + 5)(x + 2)}{x + 1}\]for $x > 0.$
Expanding, we get
\[\frac{(x + 5)(x + 2)}{x + 1} = \frac{x^2 + 7x + 10}{x + 1}.\]By long division,
\[\frac{x^2 + 7x + 10}{x + 1} = x + 6 + \frac{4}{x + 1} = (x + 1) + \frac{4}{x + 1} + 5.\]By AM-GM,
\[(x + 1) + \frac{4}{x + 1} \ge 2 \sqrt{(x + 1) \cdot \frac{4}{x + 1}} = 4,\]so $(x + 1) + \frac{4}{x + 1} + 5 \ge 9.$

Equality occurs when $x = 1,$ so the minimum value is $\boxed{9}.$