Triangle DGE is similar to Triangle EGF, so the corresponding side lengths are proportional.
Thus, 4/7 = 7/DG. To solve for DG, invert both sides of this equation:
7/4 = DG/7
and then multiply both sides of this last equation by 7, to eliminate 7 from the denominator of DG/7:
49/4 = DG
The length of side DG is 49/4.