You require an 18 months forward rate, 6 months from today. So the end of the horizon is 24 months.
Therefore a 24 month investmement is equivalent to what? A 6 month investment starting today and an 18 month investment starting 6 months from today. Note that both investments start today and end in 24 months.
It should look something like this: r(0,4) = 24 month rate starting today (ive used 4 as the end becuase it is 4 6-months periods) r(0,1) = 6 month rate startinig today f(1,4) = 18 months rate starting in 6 months and ending in 24 months from today
If you’re calculating the 18-month forward rate starting 6 months from now, then the start of that forward rate is one period (6 months) from now, and the end is four periods (2 years) from now; you can calculate the forward rate if you have the spot rate for the start of the forward rate and the spot rate for the end of the forward rate.
The approximation uses the same rates as the full calculation; here, the 1-period (6-month) and 4-period (2-year) spot rates.