You just need to allow some time for the DHCP to work and then run the PRINT #4 "<IP>" command and use the INPUT$(4) to obtain the dynamic IP address assigned by the DHCP server.
One simple example is during initialization to wait for the IP address for up to 10 seconds:
FOR P = 1 to 10
PRINT #4 "<IP>" ' Get IP address of this FServer as a string
B$ = INPUT$(4)
IF LEN(B$) <> 0 AND STRCMP(B$,"0.0.0.0") <> 0
EXIT
ENDIF
DELAY 1000
NEXT
A$ = "IP=" + B$ + " "
SETLCD 1,1, A$