Let z be the total cost (a function of x) and D be the total distance (a constant),then
z = 17 * D/x + 2.8 * D/(500/x)
(The steps above are for explanation purpose only.They are not required.You can alternatively let y be the total cost per unit distance and derive the following.)
Let y (= z/D) = 17/x + 2.8x/500
Now you can minimize y,that is to find a reasonable (x,y) when the derivative of y,y',is 0.
y' = -17x^(-2) + 7/1250 = 0
x^2 = 17*1250/7
x = 55.097 = 55.10