Hello, Gramilton, and welcome to the Grammar Exchange.
This is a question from a test that the school I work for in Japan has set. It was written by a non-native English speaker so it's a little unnatural. Anyway, which is correct? And why, if you please?
"She used to be very shy and KEEP / KEPT quiet if she was spoken to by someone."
Both answers are correct. With "keep," the sentence corresponds in meaning to (1) below; with "kept," it corresponds to (2).
(1) She used to be very shy, and she used to keep quiet if she was spoken to by someone.
(2) She used to be very shy, and she kept quiet if she was spoken to by someone.
With "keep" the coordination is between the verb phrases "be very shy" and "keep quiet." With "kept," it's between "used to be very shy" and "kept quiet."