Sam is a level 8 sorcerer that takes 1 level of wizard for his 9th level. He now has a wizard spellbook and all that. Walter the level 9 wizard has a thought. Walter hands Sam his own spellbook for a day.
Can Sam prepare the 5th level wizard spells in Walter's book? He has the spell slots and the book has the spells.
Not in the scope of the question: Number of spells preparable. Sam is a level 1 wizard with Int 14 - so, three spells. Walter is a curious wizard who is willing allowing this to happen. Sam can read the language in Walter's spell book.