This comment was posted to reddit on Sep 12, 2016 at 8:56 pm and was deleted within 5 minutes.

Since we know that AE is equal to 200, that C bisects this line, and that x is the length of AC, CE can be represented as 200 - x. To calculate the total length of the course, you just need to add together all of the individual lengths of the sides, which are basically two triangles. For the equation, the unsimplified form is L = 20 + 40 + x + (200 - x) + (length of AB) + (length of DE), though you could actually remove the x's to get just 200, since they cancel each other out. We can get the lengths of the hypotenuses of each individual triangle by using the Pythagorean Theorem, a^{2} + b^{2} = c^{2,} which we can rearrange into c = sqrt(a^{2} + b^{2}), in other words c is equal to the square root of the square of b plus the square of a. For AB, we would substitute a in the equation for our constant of 20 and substitute b for x, and for DE, we would substitute a for 40 and b for 200 - x. You will probably want to clean up and simplify the equation at this point.

To answer b and c, you should take the derivative of L with respect to x, and find out where dL/dx is equal to zero from x = 0 to x = 200. Take those values of x and plug them in, and compare the resulting values of L to determine which is the shortest and longest.

Hope that helps.