Are PV of multiple interest rates preferred in valuation?

For an asset that pays 100 for 10 years and 1000 terminal value,
if annual interest rate for 10 years is 10%, PV would be 1000.

But then, if we know that the annual interest rate for 2 years is different, suppose 15%
2y8y rate will be approximately 9.4%,
PV of first two payment would be 166, and the rest 816.8 using two different interest rates which sums up to 982.8

If we are given 2yr and 10yr rate, which method would be preferred?
I think I read somewhere that we should use the one that matches the length of the project, which would be 10yr.
But then is the potential impact of different short term risk ignored?