You want both machines to sync content to the iPhone, or to be synced with each other?
One machine will have to be the master, which is synced automatically and backs up your apps and iPhone data. The other you'll have to manually keep in sync - you definitely cannot automatically sync two machine with one iPhone without each completely wiping the device every time, at least without complex 3rd party hacks which I don't recommend.
In your preferences on the machine that should not sync automatiically, check the box on the 'devices' tab that says "prevent iPods, iPhone and iPads from automatically syncing" and on that machine, manually copy data to the device.
Note - anything you purchase on the device itself will be automatically copied to the master computer (the one that syncs automatically) but you can also manually copy back anything to the other machine as well, by right-clicking on the iPhone icon when it's connecting and select "Transfer Purchases". Both machine have to be logged in to your iTunes account for this to work, obviously.