Check the picture below.
so, since we have perpendicular bisectors, that means the segment is being cut into two equal halves, so AD = DB = 6, that makes AB simply AD + DB.
Now, the triangles of ADG and BDG are both sharing a side, that is DG, and since we know AD = DB and these are right-triangles, then both triangles are congruent by the LL theorem, so if they're congruent, then BG = AG.