To find the profit when 5 items are sold, we need to evaluate the function \( P(x) \) at \( x = 5 \).
The profit function is given by:
\[ P(x) = -2x^2 + 40x - 100 \]
Now, we will substitute \( x = 5 \) into the equation:
\[ P(5) = -2(5)^2 + 40(5) - 100 \]
Calculating \( (5)^2 \):
\[ (5)^2 = 25 \]
Now substituting back into the equation:
\[ P(5) = -2(25) + 40(5) - 100 \]
Calculating \( -2(25) \):
\[ -2(25) = -50 \]
Calculating \( 40(5) \):
\[ 40(5) = 200 \]
Now substituting these values back into the equation:
\[ P(5) = -50 + 200 - 100 \]
Combining these values:
\[ P(5) = 150 - 100 = 50 \]
Thus, the profit when 5 items are sold is
\[ \boxed{50} \]