Which three years is the Pasuk referring to?
Rashi (from Toras Kohanim) and Targum Yonasan (on Pasuk 23): It refers to the sixth, seventh and eighth years. 1
Ramban (citing a second opinion in Toras Kohanim): It refers to the seventh, Yovel and the year after the Yovel. 2
Rashi: I fact, it refers to the sixth year, from Nisan until Rosh Hashanah and the entire seventh and eighth years. They will then plant in Marcheshvan of the eighth year and harvest in Nisan, gather it in from the fields in Tishrei of the ninth year and plant afresh in Marcheshvan of the ninth year - as the Pasuk goes on to explain.
According to Rashi (in Pasuk 22), when Shemitah is followed by Yovel, the land will yield four years produce in the sixth year, enough to last until the ninth year.