Let $ABC$ be a triangle and $DEFG$ be a square, where $D, E$ points are located on $AB$ and $AC$ or their extension line. $F, G$ points are located on $BC$ or the extension of $BC$. The perpendicular distance from $A$ on $BC$ is $2$ units and $BC$ = $6$ units. What is the value of the perimeter of $DEFG$?
Here, I'm little bit confused about the exact location of the points $D, E, F, G$ respectively. I noticed that this 4 points could locate on either on the side of the triangle or on their extension line. So, I thought that the length of the square would be variable according to the various construction of the triangle $ABC$. I couldn't find a way to figure it out. Therefore, I need some help about how to construct that square with keeping its length constant with above mentioned condition.
The error is highly excusable.
The distance from $A$ to the nearest side of the square is $|x-2|$, where $x$ is a side of the square.
Thus, by the similarity we obtain: $$\frac{|x-2|}{2}=\frac{x}{6},$$ which gives $$x=\frac{3}{2}$$ and the answer $6$ or $$x=3$$ and the answer $12$.