A starting tip is to set a listener for the onExtentChange event on the first map.
When this extent changes, update the second map's extent to match the first map's extent. Repeat in the reverse order so the second map updates the first map.
You might run into some problems with recursive/repeated calling of these events, where map 1 calls map 2, which then calls map 1 again repeatedly - you may need to disable the listeners temporarily while updating each map's extent.