To find the amount spent on marketing that will yield the maximum profit, we need to find the vertex of the quadratic equation given by:
\[ P = -5x^2 + 1,000x + 5,000 \]
In a quadratic equation of the form \( ax^2 + bx + c \), the x-coordinate of the vertex (which gives the maximum or minimum value) is found using the formula:
\[ x = -\frac{b}{2a} \]
In our equation:
- \( a = -5 \)
- \( b = 1,000 \)
Substituting these values into the formula, we get:
\[ x = -\frac{1,000}{2 \times -5} = -\frac{1,000}{-10} = 100 \]
Therefore, the amount spent on marketing to achieve the maximum profit is:
\[ \boxed{100} \text{ (in thousands of dollars)} \]
This means the company should spend $100,000 on marketing to achieve maximum profit.