Two iPhones do not use a single backup. Both iTunes and iCloud recognize that they are different iPhones (serial number) and create separate backups for each. (If you see only one backup in iCloud or iTunes, it means one of those phones is not being backed up at all.)
If both iPhones have the same name (such as "Tomasevich's iPhone") change the names so they are different (Settings > General > About > Name) and that will make it easier to tell which backup is which.
If you go into Settings > [name] > iCloud > Manage Storage > Backups and you see two backups, both named "Tomasevich's iPhone" the backup of the phone you're using will say "Tomasevich's iPhone This iPhone" while the other will be simply "Tomasevich's iPhone." Look at the backup size of each of those backups - they'll almost definitely be different.
Restoring from a backup will not change the contents on another device. Restoring is a one-way process - from the backup to the phone being restored.
The same is true for shared iCloud data like Contacts, iCloud Photos, Calendars, and Notes (I assume both phones are using the same iCloud account). Erasing a phone does not erase information in iCloud. When that erased phone is setup again (signing into iCloud), the information that is already in iCloud is copied to the phone.