/Douzo/ is used when you offer/permit or hand over something.
/Doumo/ is a polite but short thank you.
Both can be used toward anyone regardless of their age or social status.
/Arigatou/ is said toward an equal or younger/lower-ranking person. It cannot be used toward an older/higher-ranking person.
/Arigatou gozaimasu/ sounds casual but polite enough to be said toward an older/higher-ranking person. One can be polite in a casual setting.