The Multiclassing rules state that you determine the spells you are able to prepare and cast independently, but it does not seem to apply to spells a wizard is able to transcribe into their spellbook.
Spells Known and Prepared. You determine what spells you know and can prepare for each class individually, as if you were a single-classed member of that class. If you are a ranger 4/wizard 3, for example, you know three 1st-level ranger spells based on your levels in the ranger class. As 3rd-level wizard, you know three wizard cantrips, and your spellbook contains ten wizard spells, two of which (the two you gained when you reached 3rd level as a wizard) can be 2nd-level spells. If your intelligence is 16, you can prepare six wizard spells from your spellbook.
Learning Spells of 1st Level and Higher. Each time you gain a wizard level, you can add two wizard spells of your choice to your spellbook. Each of these spells must be of a level for which you have spell slots, as shown on the Wizard table.
Your Spellbook (p. 114). The spells copied into a spellbook must be of a spell level the wizard can prepare.
For the sake of the question assume both classes are able to cast up to and including 9th level spells.