We can find the x coordinate of A thusly
12^2 - x^2 = 17^2 - (18 - x)^2
144 - x^2 = 289 - (x^2 - 36x + 324)
144 = -35 + 36x
179 = 36x
x = 179 / 36
And we can find the y coordinate of A as follows
sqrt [ 12^2 - (179/36)^2 ] = sqrt [154583 ] / 36
So A = ( 179/36, sqrt [ 154583] / 36 )
Let the midpoint of BC = (9,0) = D
AG will be 2/3 of the distance AD
So
AG = (2/3)sqrt [ ( 179/36 - 9)^2 + (154583/36^2) ] = sqrt [ 542] / 3 ≈ 7.76