To find the amount spent on marketing that will achieve the maximum profit, we need to determine the vertex of the quadratic function given by the profit formula:
\[ P = -5x^2 + 1000x + 5000 \]
In a quadratic equation of the form \( P = ax^2 + bx + c \), the x-coordinate of the vertex (which gives the maximum profit for a parabola that opens downwards) can be found using the formula:
\[ x = -\frac{b}{2a} \]
In this case, \( a = -5 \) and \( b = 1000 \). Plugging in these values:
\[ x = -\frac{1000}{2(-5)} = -\frac{1000}{-10} = 100 \]
Therefore, the amount spent on marketing to achieve the maximum profit is:
\[ \boxed{100} \text{ thousand dollars} \]