The profit function given is:
\[ P = -5x^2 + 1,000x + 5,000 \]
This is a quadratic function in the standard form \( P = ax^2 + bx + c \), where:
- \( a = -5 \)
- \( b = 1,000 \)
- \( c = 5,000 \)
To find the value of \( x \) that will maximize the profit, we can use the vertex formula for a quadratic equation. The x-coordinate of the vertex (maximum point for a concave down parabola) is given by:
\[ x = -\frac{b}{2a} \]
Substituting the values of \( a \) and \( b \):
\[ x = -\frac{1,000}{2(-5)} \]
Calculating this:
\[ x = -\frac{1,000}{-10} \] \[ x = 100 \]
Thus, the amount spent on marketing to achieve maximum profit is \( \boxed{100} \) (in thousands of dollars).