Complex sentence: Mazeredo discovered that Maitland was Lord St Vincent's flag lieutenant, and being under an obligation to St Vincent, set Maitland free and returned him to Gibraltar without requesting an exchange.
Split into simpler sentences: Mazeredo discovered that Maitland was Lord St Vincent's flag lieutenant. Being under an obligation to St Vincent, Mazaredo set Maitland free and returned him to Gibraltar without requesting an exchange.