They are compatible?

Good afternoon, I have a question, is it possible to work a Yamaha PSR S970 keyboard DMH card on a Yamaha PSR S770 keyboard?

Because the other circuit boards of the S770 and S970 keyboards are the same.

you can try. most likely the connectors would be the same if they are the same. the only issue is if its got a rom chip or eprom chip that might be slightly different as far as what it does to control the onboard processing chips .
Yamaha will have the schematics for that on their website, they have all their equipment service manuals online, one of the few companies that do that.