Can someone help me understand how currency forward is valued at time t after initiation?

I am having a hard time to recall how this works from Level II. The formula is:

Value of currency forward at time t = Spot FX rate at time t / (1+Foreign interest rate)^(T-t) - FX Forward rate set when contract initiated / (1+domestic rate)^ (T-t)

using example 8 in reading 34 (page 238), question 1

US investor long a forward contract at $0.90 per euro in 2 years. Interest rate in 6% in the US, 5% in the Europe. After 6 months, the spot rate is $0.862 per euro, interest rates in US and EU not changed, the book says the value of the contract at that time is 0.862/(1.05)^1.5 - $0.90 / (1.06)^1.5

My question is,

based on my understanding, value of forward at any given time t, is the difference between market value of underlying asset at time t, and the PV of forward price. So in the first part of the formula, why the spot fx rate needs to be discounted at foreign interest rate? shouldnâ€™t this just be the spot rate, which is the market price of underlying FX?

Thanks for your help. I must be missing something hereâ€¦