Using multiple iMacs (27 inch 2009) as displays
It’s possible to use an iMac as a secondary display of another iMac. You’ll only be able to use one of your ‘other’ iMac’s to do that.

To do so, you need to activate ‘Target Display Mode’ on the iMac you want to use as a display.


Both iMac must be turned on and both must be logged ‘in’.
Connect the ‘Mini DisplayPort’ or ‘Thunderbolt’ cable between the two computers.
Press ‘Command + F2’ on the keyboard of the iMac that you want to use as a 
display.


Your target iMac will now display the desktop of the other, connected Mac. To exit TDM, just press Command + F2 again.
It will also exit if you disconnect the cable or shut down/sleep the other Mac.

Remark: this only works on iMacs up to 2014, The 5K Retina and newer ones don’t support this.