The TO-infinitive to replace a relative clause
A to-infinitive clause can replace a defining relative clause after ordinal numbers (the first, the second etc.), after superlatives (the best, the most beautiful etc.) and after next, last and only:
Ethan is usually the last person to understand the joke. (Ethan is usually the last person who understands the joke.)
His office was the next room to clean. (His office was the next room that they had to clean.)
Passive infinitives are also possible:
His was the last composition to be marked. (His was the last composition which was marked.)