Complex sentence: The two countries fought each other (albeit only with some very limited naval combat) during the Anglo-Russian War (1807--12), after which Britain and Russia became allies against Napoleon in the Napoleonic Wars.
Split into simpler sentences: The two countries were at war, with some very limited naval combat during the Anglo-Russian War (1807--12). In 1812 Britain and Russia became allies against Napoleon in the Napoleonic Wars.