Arch rivals Toyota and Nissan are planning to work together to develop gasoline-electric hybrid vehicles in a move that is designed to help speed the development of more affordable and environmentally friendly cars.