The library book must be returned in three weeks.
Adjective
Adverb
In three weeks functions as an adverb modifying the verb must be returned. When must the book be returned? In three weeks.