There may be a direct route to the answer using similar triangles, but I couldn't find it,
so I used coordinate geometry.
Placing this in quadrant I, with D at the origin and the distance from D to C being a:
D = (0,0) C = (a,0) A = (0,12) B = (a,12).
The equation of AC is: y - 12 = (12 - 0)/(0 - a) · (x - 0) ---> y = (-12/a)·x + 12
Since AC and DB are diagonals, they intersect at the center of the rectangle = (a/2,6).
This makes E = (0,6).
The equation of BE: y - 6 = (12 - 6)/(a - 0) · (x - 0) ---> y = (6/a)·x + 6
Where BE and AC intersect: (6/a)·x + 6 = (-12/a)·x + 12
(18/a)·x = 6
x = (1/3)·a
Since y = (6/a)·x + 6 ---> y = (6/a)·[(1/3)·a] + 6 ---> y = 8
Combining, we have the point ( (1/3)·a, 8 )
This makes point F = (0,8).
The equation of FB: y - 8 = (12 - 8)/(a - 0) · (x - 0) ---> y = (4/a)·x + 8
Where FB and AC inersect: (4/a)·x + 8 = (-12/a)·x + 12
(16/a)·x = 4
x = a/4
Since y = (4/a)·x + 8 ---> y = (4/a)·(a/4) + 8 ---> y = 9
This makes point G = (0,9)
So, the distance from A to G is from (0,12) to (0,9) = 3