This is the beginning of the end of John's vision. In this versethe angel is speaking to John. This can be shown clearly as it is in the UDB. (See: [[rc://en/ta/man/translate/figs-explicit]])
Here "words" refers to a message. See how you translated this in [Revelation 21:5](../21/05.md). Alternate translation: "This message is trustworthy and true" (See: [[rc://en/ta/man/translate/figs-metonymy]])
Possible meanings are 1) the word "spirits" refers to the inward disposition of the prophets and indicates that God inspires them. Alternate translation: "God who inspires the prophets" or 2) the word "spirits" refers to the Holy Spirit who inspires the prophets. Alternate translation: "God who gives his Spirit to the prophets" (See: [[rc://en/ta/man/translate/figs-metonymy]])