Normally you use a three way switch to control 1 light from 2 different locations. A double switch is used to control two different lights independently at 1 location. Since you state "two way switch" in the title, but talk about a double switch in the body, it's unclear what you are trying to accomplish, however, I'll assume you want to use a three way switch.
The red wire is a traveler. This goes to the third connection on the switch. The white wires get twisted together. The green is a ground and the black is hot. check this: http://www.electrical-online.com/extra-graphics/3wayswitch.htm
Tony, August 2006