If you trust the cloud Mozilla's client side encrypted sync service will do this.
If you want simple and dirty.
1. Create a backup of your bookmarks using the import and backup button on the Library window on each machine
2. Pick your favorite scripting language
3. merge the two json backup files using your script
Import the resulting json file in a clean Firefox profile.