One little point, chever...
Having done the differentiation, and solved for a turning point of the function, you must verify that against any boundary values, etc.
In this case, the "obvious" things to check are x -> 0 and x -> inf, which both yield cost->inf, so that's OK.
The solution, x = 20, gives a cost of 6,000. which seems fine.
However, being pedantic, a speed of -inf gives a cost of -inf. I.e. don't go toward your destination, but run away from it, as fast as you can, and you will earn money.
The trouble with models, is that you always have to be sure you haven't overlooked something.
_________________
"Striking up conversations with strangers is an autistic person's version of extreme sports."
Kamran Nazeer