To find the amount of spending on marketing that maximizes profit, we can use the formula for the vertex of a quadratic function. The profit function given is
\[ P = -5x^2 + 1000x + 5000 \]
This is a quadratic equation in the form \( P = ax^2 + bx + c \), where:
- \( a = -5 \)
- \( b = 1000 \)
- \( c = 5000 \)
The x-coordinate of the vertex (which represents the maximum point for a downward-opening parabola like this one) can be found using the formula:
\[ x = -\frac{b}{2a} \]
Substituting the values of \( a \) and \( b \):
\[ x = -\frac{1000}{2 \cdot -5} = -\frac{1000}{-10} = 100 \]
Thus, the amount of spending in thousands that will be directed toward marketing to achieve the maximum profit is:
\[ \boxed{100} \]