Let $ABCD$ be a square such that $A=(0,0)$ and $D=(1,1)$. $P(\frac{2}{7},\frac{1}{4})$ is a point inside the square. An ant starts walking from $P$, touches $3$ sides of the square and comes back to the point $P$. What is the least possible distance traveled by the ant?
This is a question from BdMO 2021. I don't understand the question very much. Though here is my little approach:
Here is the figure of the problem. The co-ordinates are multiplied by $28$ to get a clearer view. We get the least possible path (probably) when the ant goes from $P$ to $F$ such that $PF\perp{AB}$, then goes to $H$ such that $PH\perp{AD}$ and then to $G$ such that $PG\perp{CD}$ and returns from $G$ to $P$ ( I'm not sure about this and I don't have any proof of this).
So, what's the solution with proper proof?


Let $ABCD$ be the square and $P(\frac{2}{7},\frac{1}{4})$ be the point. We reflect the square and the point $P$ repeatedly as shown in the picture.
The sides of square $ABCD$ are colored pink, blue, green and violet. The segments with same color represent that they are the reflections of a same segment of square $ABCD$.
Let $PE$ be the perpendicular segment from $P$ to $AD$ (not shown in the figure). We see that from $\Delta{PAD}$: $$PE=\frac{1}{28\sqrt{2}}.$$ We now see that we get the shortest path when the ant touches $AD$, $AB$ and $CD$ sides i.e pink, blue and violet segments respectively (Because $P$ is closer to these segments). We see that $PP_1$ touches these $3$ segments, which means $PP_1$ is the shortest path.
Now we draw $\Delta{PP_1P_2}$, which is a right triangle with $PP_2=2\sqrt{2}$ (double of the side length of square $ABCD$) and $P_1P_2=2PE=\frac{1}{14\sqrt{2}}$. So, we have $$PP_1=\sqrt{(2\sqrt{2})^{2}+(\frac{1}{14\sqrt{2}})^2}=\boxed{\frac{\sqrt{6274}}{28}}.$$ Hence, we conclude the problem. $\square$