Is the following sentence grammatically correct? Is it correct to say "demand somebody that something be done"?
He demanded her that the books she borrowed from him be returned.
Is the following sentence grammatically correct? Is it correct to say "demand somebody that something be done"?
He demanded her that the books she borrowed from him be returned.
Close, but no.
The only object of “to demand” is what you are demanding; it doesn’t take an indirect object. So, we usually structure the demand as an active phrase:
He demanded (that) she return the books (that) she had borrowed from him.
If it is not clear from the demand or other context who the demand is being made of, as in your example with a passive phrase, you could insert a prepositional phrase before it:
He demanded of her that the books she borrowed from him be returned.
This feels a bit awkward. Sometimes it is unavoidable, but if you can rephrase the demand from passive to active, that is much preferred.