The first term is a discount factor applied to the notional amount, which is essentially the value of $1 discounted to the time of valuation by the appropriate rate. The appropriate rate corresponds to the time gap between contract settlement and time of valuation, or (h-g). This can also be viewed as the amount needed to invest today at the stated rate to earn enough interest to have the necessary notional amount at contract settlement (assuming you multiply the factor times the notional amount).
The second term discounts the FRA rate back to the time of valuation (g). Since the FRA rate “serves its term” beyond the date of contract settlement, we need to discount back from the end of the FRA rate term to the time of valuation. This is why the longer term rate is in the denominator, based on (h+m-g).
Subtracting the second term from the first term gives the value of the FRA to the long position, given all of the discounting/compounding based on prevailing market rates at time g.