Integrate by parts: let u=15x, then du=15dx; let dv=e^-0.002xdx, then v=-(e^-0.002x)/0.002.
d(uv)/dx=udv/dx+vdu/dx; d(-15x(e^-0.002x)/0.002)=15xe^-0.002xdx-15(e^-0.002x)dx/0.0002.
Integrate both sides: -15x(e^-0.002x)/0.002=integral(15xe^-0.002xdx)+(15/0.0002^2)e^-0.002x;
p=integral(15xe^-0.002xdx)=-7500xe^-0.002x-3750000e^-0.002x+k;
p=-7500(x-500)(e^-0.002x)+k, where k is the constant of the indefinite integration.
Differentiating dp/dx will not help to find x. p is a function of x. When p=k x=500 when dp/dx=0, x=0, but neither of these are stated in the question.