过点F作FM⊥AC于M,过点G作GN⊥BC于N
∵CE平分∠ACB
∴∠ACE=∠BCE
∵AD⊥BC,FM⊥AC,CF=CF
∴△CDF全等于△CMF
∴DF=MF
∵GN⊥BC,AD⊥BC,FG∥BC
∴矩形FGND
∴DF=GN
∵AD⊥BC
∴∠CAD+∠ACB=90
∵∠BAC=90
∴∠B+∠ACB=90
∴∠B=∠CAD
∴△AFM全等于△BGN
∴BG=AF
∵∠DCF+∠CFD=90,∠ACF+∠AEC=90,∠ACE=∠BCF
∴∠CFD=∠AEC
∵∠CFD=∠AFE
∴∠AEC=∠AFE
∴AE=AF
∴BG=AE
∵AE=2,AB=7
∴EG=AB-AE-BG=7-2-2=3