How can I take care of the teeth of someone with dementia?

Consult with dentist. Dentist might answer it more fully, but again ability to take care of oneself deteriorates as dementia advances. At skilled nursing facility, cna usually helps with brushing teeth, etc. Nursing facilities also keep track of dental appointments for cleaning. At home, consult with your dentist, and follow his instructions, but if the person needs help with brushing, then it should be done.
Oversee their care. That's a very difficult situation all around. From a dental standpoint, there are no magic answers. You basically have to treat the individual as a child in regards to reminding them, overseeing how well they do, & actually have someone do it for them if they are unable to do it themselves. They have a greater chance of developing cavities & gum problems & therefore need to be seen by a dds often.