Yes that can be done without any problem.
Important is to keep grounding regulations in mind.
You can find it in the manuals.
I wonder why you would do that, both cpu can exchange data via the communication ports.
Please let us know!
Please no technical questions by PM, use the forum!