Devices can only sync with one library at a time. If you plug it into a different library it asks if you want to sync with that library from now on.
There is no easy way to merge libraries:
Combining libraries by exporting as .xml playlist from one library and then importing playlist in another library.
http://forums.ilounge.com/itunes-mac-pc/234406-merge-combine-two-itunes-librarie s-into-one.html#post1274671 - This is an older post and Import and Export are in File > Library in iTunes 10.
similar process at:
By merge libraries I assume you mean keep all things such as playlists, ratings, playcount, date added, etc. If all you want to do is add content from one to the other, go to the iTunes Media folder, copy the files there to a flash drive, drag the files from the flash drive to the library window of the other iTunes. You will of course have to add them to playlists, etc.
Maybe something helpful here:
Using iPhone, iPad, or iPod with multiple computers - http://support.apple.com/kb/HT1202 - You can manage your iPhone, iPad, or iPod with multiple computers as long as you have set the device to "Manually manage music." - E.g., adding music from a second computer to an i-device. Additional information about switching sync mode - https://discussions.apple.com/thread/4435531