Both the 9,1 (Early 2009) and 10,1 (Late 2009) iMac's only support Target Disk Mode using FireWire.
Adding that if the Late 2009 is a 27" then it supports Mini DisplayPort input for use as a monitor from another Mini DisplayPort Mac.
An Ethernet cable can be used for Networking and File Sharing the two iMac's.
see > Mac Basics: File Sharing
Plus connecting two iMac's together with a USB cable, will do nothing except trip the USB port overloads or something worse.