If I clear my old iPhone will the icloud back up stay on my new iPhone?

Someone I know has a new iPhone 5 and I'm having their iPhone 4. They saved everything on the iPhone 4 to icloud and then downloaded that data onto the new iPhone 5. I want to clear the iPhone 4 putting it back to original state, however, they are concerned that as this phone holds the original photos etc. That this might also delete them off the new iPhone 5. Does anyone know for certain if this will happen or what to do to avoid it? Preferably without needing to back up to a computer.

First of all it's always a good idea to make a backup.

Second. Deleting the iCloud account off the phone will solve your problem and allow you to wipe the phone without affecting their new phone.

If you change the account on it and then erase the iPhone you will be fine. If you erase an iphone it will only erase the stuff on the iPhone