If someone is a representative for two terms and a senator for three terms, how many years has that person been in public office?

a. 30
b. 18
c. 22
d. 20