NOT A TEACHER
1. I have read #1 several times. I believe that you either copied the sentence incorrectly, or the writer wrote an incorrect sentence.
a. This is how I would revise that sentence: "We had to write about what we said about our pets."
b. My books tell me that when "what" is a relative pronoun, it = that which.
c. Let's substitute "that which" for "what": "We had to write about that which we said about our pets."
It seems to work.
2. My book gives this sentence: "I wonder what he will say.
a. It calls "what" an interrogative pronoun. The direct question is "What will he say?"
b. The indirect question "what he will say" becomes the object of the verb "wonder."
c. Your direct question is "What does he want?"
d. The indirect question " what he wants"" becomes the object of the verb "know."
Source: House and Harman, Descriptive English Grammar (copyright 1931 and 1950).
Student or Learner