AD is angular bisector of A. Hence angle GAC or DAC = 30 deg. If we take the point at which square touches AC as K, then angle AKG = 60 deg, since angle AGK = 90 deg.
tan AKG=AGGK
GK=a2, since AD also divides the side of square into half.
therefore,tan AKG=AGa2=√3 because AKG = 60 deg.
→AG=√3×a2