Finding the least segment of moving point? Let $A=(0,1)$ and $B= (2,0)$ in the  plane. Let $O$ be the origin  and  $C=(2,1)$. Let $P$ move on the segment $OB$ and let $Q$ move on the segment $AC$. Find the coordinates of $P$ and $Q$ for  which  the length of the path consiting of the  segmet $AP$,$PQ$ and $QB$ is the least.
I was trying to solve this question . I located all of the coordinates of  $A=(0,1)$ , $B=(2,0)$ and $C =(2,1)$. I was taking the mid point  of $AC =Q(\frac{1}{2},1)$  and  midpoint of $AB=P(1,\frac{1}{2})$, I think this will be the least segment.
I have doubts whether my answer is correct or not.
I would be very thankful to anybody who helps me.
 A: Let $P \equiv (n,0)$ and $Q \equiv (m,1)$. Also, to get things simplified, let the distance from A to P equal $x$, from P to Q equal $y$ and from Q to B equal $z$. Then,
$$1+n^2=x^2$$
$$1+(m-n)^2=y^2$$
$$1+(2-m)^2=z^2$$
And
$$x+y+z=\sqrt{1+n^2}+\sqrt{1+(m-n)^2}+\sqrt{1+(2-m)^2}$$
In any "fixex" point $Q \equiv (m,0)$, the previous sum of distance will be minimum when its derivative with respect to $n$ equals 0. This happens only for $n=\frac{m}{2}$. Then, $x+y+z$ will reach its minimum when 
$$\frac{\sqrt{1+n^2}+\sqrt{1+(n)^2}+\sqrt{1+(2-2n)^2}}{dn}=0$$
This happens at $n=\frac{2}{3}$ and $m=\frac{4}{3}$, so the two possible answers are
$P \equiv (2/3,0)$ and $Q \equiv (4/3,1)$
And
$P \equiv (4/3,0)$ and $Q \equiv (2/3,1)$
A: The right answer is $P(\frac23;\;0)$ and $Q(\frac43;\;1)$
If you look at my picture you will understand the reason why the way is the shorter.
Duplicating twice you have that the minimal distance between $O$ and $G$ is the straight line and as $AP,\;PQ,\;QB$  are respectively equal to the blue segments we can conclude that vertical lines are $\frac13$ and $\frac23$ of segment $OB$.
Hope I made me understand. Graph is very clear, anyway
Another path, the pink one, would be longer: look at the second picture


