Because the vertices ABCD of ABC and ADC are on a circle with E as the center and AC as the diameter.
In the right triangle DFE, EF=3.
As long as the length of the chord BD of the circle E is 8, BD can "slide" on the circle, so the shortest length of AG is 0 and the longest is 2.
The length of CH or AG should be given again.