Controlling power to two RPis from Arduino mini pins, super low power - MOSFET?
You need to use a PMOS transistor as a high-side switch rather than an NMOS transistor, assuming that your Arduino runs at 5V.

Are there any other connections between the Arduino, the two Raspberry Pi modules, and other circuits? Safely switching power to one part of a system is a tricky business. Before trying to turn off the Pi you need to make sure that all of the signal inputs to it are at ground.