To find the amount spent on marketing that achieves the maximum profit, we need to determine the vertex of the quadratic function given by
\[ P = -5x^2 + 1,000x + 5,000 \]
For a quadratic function in the standard form \(P = ax^2 + bx + c\), the x-coordinate of the vertex, which gives the maximum (or minimum) value, can be found using the formula:
\[ x = -\frac{b}{2a} \]
In this case, \(a = -5\) and \(b = 1,000\). Plugging in these values:
\[ x = -\frac{1,000}{2(-5)} = -\frac{1,000}{-10} = 100 \]
So, the amount directed toward marketing to achieve the maximum profit is \(x = 100\) thousands of dollars.
Thus, the answer is:
\[ \text{$} 100,000 \]