A deceptively simple sentence written entirely in hiragana — the stylistic choice suggests a child's voice or a children's-book narration. 言われました is the polite passive of 言う ('to say') = 'was told'. 答えました is the polite past of 答える ('to answer'). The lack of kanji gives the sentence a soft, childlike tone that would be lost in a natural translation.