There is a difference in nuance. I might choose the latter, but either way, your two examples would not cause misunderstanding. Both are possible. Most of us are more likely to say 言っていました is better, then so be it. You can accept their opinion. Personally 言いました sounds more direct, 言ってました is indirect but it's only subtle difference.
I choose (b)
(a) 田中さんを知りませんか? 田中さんはトイレに行くと言いました。
(b) 田中さんを知りませんか? 田中さんはトイレに行くと言っていました。
(a), (b), Both sound okay as a reply.
(a) 誰がそれを言いましたか? 田中さんが言いました。
(b) 誰がそれを言いましたか? 田中さんが言っていました。
「夏休みは何か旅行の予定はありますか?」
「旅行の予定はありませんね。でも田中さんは日本に行くと言っていました。」
In this context, again, I basically choose 言っていました