geometric question (About Pythagoras theorem) I might need two different method each Question 1:ABCD is a square and GDEF is a rectangle $BE=1,EC=3 $ find the length of GD

Question 2: ABCD is a right trapezoid, $CD=BC=10$ ,ABE is an equilateral triangle, please find the length of AB.
1) Triangle $ADG$ is similar to $EDC$. Hence:
$$
GD:DC=AD:DE,
\quad\text{that is:}\quad
GD:4=4:5.
$$

2) If $AD=x$ and $DE=y$ then by Pythagoras' theorem:
$$
x^2+y^2=10^2+(10-y)^2=10^2+(10-x)^2.
$$
Question 1:

Since BC=4=AB, the distance AC is $4\sqrt 2$. Also, CDE is a 3-4-5 triangle, of area 6.  So if DE is its base, then $A=\frac 12 bh$ gives its height to be 2.4.  That means that the distance GD, which is equal to the distance from A to the intersection of DE with AC, is $4\sqrt 2 - 2.4$.

Hint for question 2:

The bottom white triangle gives you:
$10^2 + CE^2 = ANS^2$

The top white triangle gives: $(10-CE)^2+AD^2=ANS^2$

You can figure out AD by setting up trigonometric identities.

Now, solve this system of equations.