So there is this rectangular area, $3km$ wide by $8km$ long. $A$ is at the top left hand corner of the area. $B$ is the bottom right hand corner. $C$ is the top right hand corner and $D$ is some point that lies on $BC$.
I have to find the quickest way to get from $A$ to $B$ when traveling across the area can be done at $6 km/hr$ while travelling along the perimeter can be achieved at $8 km/hr$
So essentially I have to derive an equation to get to $B$ from $A$ and minimise the time it will take to travel across the area to get to such point.
So far i have figure that $AD = \sqrt{3^2 +x^2}$ where $x$ is the distance of $CD$ and $DB=8-x$. However how am i supposed to make an equation to minimise the time when all i have are distance values?
Thanks for any help.