Calculating the lengh of $AG$ in a square $ABCD$ is a rectangle and the lines ending at $E$, $F$ and $G$ are all parallel to $AB$ as shown. 
If $AD = 12$, then calculate the length of $AG$.
Ok, I started by setting up a system of axes where $A$ is the origin and the $x$-axis along $AB$ and the $y$-axis along $AD$. So $D(0;-12)$ AND $C(x;-12)$ and $B(x;0)$. I am really stuck now on how to proceed so can someone please help me?
 A: I would suggest you to set the origin in $B$. Setting $AB=DC=d$, line $AC$ has equation $y=-\frac{12}{d}x-12$, and point $E$ has coordinates $(-d,-6)$.
Since line $EB$ has equation $y=\frac{6}{d}x$, the $x$-coordinate of its intersection with $AC$ is  given by the solution of
$$\frac{6}{d}x=-\frac{12}{d}x-12$$
which is $x=-\frac{2}{3}d$. The $y$-coordinate of the intersection is then $y=4$. So we get that the $y$-coordinate of point $F$ is equal to $4$ as well.
Repeating the procedure, we can note that because line $FB$ has equation $y=\frac{4}{d}x$, the $x$-coordinate of its intersection with $AC$ is  given by the solution of
$$\frac{4}{d}x=-\frac{12}{d}x-12$$
which is $x=-\frac{3}{4}d$. The $y$-coordinate of the intersection is then $y=3$. So we get that the $y$-coordinate of point $G$ is equal to $3$ as well, and then $AG= 3$.
A: A solution without coordinates:
Let $E',F'$, and $G'$ be the intersection points on $AC$ of the lines parallel to $AB$ through $E,F$, and $G$ respectively. By symmetry, $AE=ED=6$. And $\triangle ABD \sim \triangle EE'D$, so $EE' = \tfrac 12 AB$.
Then $\triangle ABF' \sim \triangle E'EF'$, and $EE' = \tfrac 12 AB$, so the altitude of $\triangle ABF'$ and the altitude of $E'EF'$ are in a $2:1$ ratio, i.e. $AF=2EF$, so $AF=4$ and $EF=2$.
Then $FF' = \tfrac 13 CD = \tfrac 13 AB$, since $\frac{AF}{AD}=\tfrac 13$, and $\triangle AFF' \sim \triangle ADC$. And $\triangle BAG' \sim \triangle FF'G'$, so comparing altitudes gives us $AG = 3GF$, so $AG=3$.
