In verse 9 there is a break from the main story line as John tells us background information about Jesus fulfilling Scripture. (See: [[rc://en/ta/man/translate/writing-background]])
Here "the word" refers to the words Jesus had prayed. You can translate this in an active form. AT: "This happened in order to fulfill the words that he had said when he was praying to his Father" (See: [[rc://en/ta/man/translate/figs-explicit]] and [[rc://en/ta/man/translate/figs-activepassive]])