To find the amount spent on marketing (x) that will maximize the profit \( P = -5x^2 + 1000x + 5000 \), we can determine the vertex of the parabola represented by this quadratic equation. The formula for the x-coordinate of the vertex of a quadratic equation in the form \( ax^2 + bx + c \) is given by:
\[ x = -\frac{b}{2a} \]
In this case, \( a = -5 \) and \( b = 1000 \).
Substituting these values into the formula:
\[ x = -\frac{1000}{2 \times -5} = -\frac{1000}{-10} = 100 \]
Thus, the amount that should be spent on marketing to achieve the maximum profit is 100 thousand dollars.