Take the first derivative of the function and set it to zero and solve for x
d/dx (2x)( 500-x)^1/2= 2(500-x)^1/2 + (2x) ( -1/2) (500-x)^-1/2= 2(500-x)1/2 -x/(500-x)^1/2=
[2(500-x)^3/2 -x]/ (500-x)^1/2
set this to zero and solve for x = 333 1/3
when x= 333 1/3 y=8606