What is the cheapest way for two devices spaced less than 10 feet apart to communicate wirelessly with each other?
I'll assume you want to do this wireless, otherwise the solution is obvious.

I would go for infrared. The transmitter can be a small microcontroller sending a pair of bytes to an IR receiver module.  

These receiver modules are tuned to a particular protocol. You can use an RC-5 module; RC-5 transmits 14-bit at a time using Manchester encoding. You can easily add a pair of bits to it, and define your own codes.

A 3 m range should not be a problem. I've used Vishay RC-5 receivers at 15 m range. At shorter distances you probably won't even have to direct the LED to the receiver. In a normal size room the signal will reflect off the walls.

A cheap RF solution is the RFM70:

  

Less than 5 dollar at Digikey. That's far less than an Xbee.